home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv102.zip / SAMPLE / WCONV / READ.ME < prev    next >
Text File  |  1995-09-19  |  4KB  |  106 lines

  1.  
  2. ===============================================================================
  3.                   Internationalization (I18N) For OS/2                 
  4. ===============================================================================
  5.  
  6.                 Copyright IBM Corporation -- 1993, 1994, 1995
  7.  
  8. DISCLAIMER: This I18N package has been made available solely to gauge OS/2
  9. developer interest in the industry standard XPG4 internationalization 
  10. programming model. This does not mean that IBM will introduce a product based
  11. on the contents of this package. This package is not a full implementation of 
  12. the X/Open XPG4 specification and does not make any claims of XPG4 branding. 
  13. It implements only the portions of the XPG4 specification which deal with 
  14. internationalization.
  15.  
  16. X/Open is a trademark of the X/Open Company Limited.
  17.  
  18. ===============================================================================
  19.  
  20.  
  21. /************************/
  22. /***     Contents     ***/
  23. /************************/
  24.  
  25. 1.  Overview
  26. 2.  Files in this directory
  27. 3.  How to run the sample program
  28. 4.  How to compile the sample program
  29.  
  30.  
  31. 1.  Overview
  32. ============
  33.  
  34. The sample program in this directory demonstrates the APIs for converting
  35. from multibyte characters (char *) to wide characters (wchar_t *), and back
  36. again.  These conversions are important when data is in one format, and
  37. you need it in the other.  Also shown are APIs to determine lengths of various
  38. wide character strings and characters, and the length, in bytes, of multibyte
  39. strings.
  40.  
  41.  
  42. 2.  Files in this directory
  43. ===========================
  44.  
  45. File            Purpose
  46. ------------------------------------------------------------------------------
  47. wconv.c         Source code for the wconv sample program.
  48. wconv.def       Definition file needed for compiling the program.
  49. wconv.mak       Make file used to compile the sample.
  50. wconv.exe       Compiled version of the wconv sample.
  51.  
  52. build.cmd       A command file which will compile and link the sample program.
  53. read.me         This file.
  54.  
  55.  
  56. 3.  How to run the sample program
  57. =================================
  58.  
  59. The following steps show how the program can be run.
  60.  
  61.      1) Run the \i18n\bin\new_vars command file (or have the environment
  62.         variables already set).
  63.  
  64.      2) Set the value of either LC_ALL or LANG to: en_us (US English).
  65.  
  66.           Ex:   set LANG=en_us
  67.  
  68.      3) Execute the wconv.exe program.
  69.  
  70.           Ex:   wconv
  71.  
  72.      4) The output from the program should be:
  73.  
  74.           Current locale is: ENUS437
  75.  
  76.           Original string:  Hello there!
  77.           Converted string: Hello there!
  78.           Converted back:   Hello there!
  79.  
  80.           Original char:  K
  81.           Converted char: K
  82.           Converted back: K
  83.  
  84.           Length of multibyte character: 'K' is: 1
  85.  
  86.           Width of wchar_t character: 'K' is: 1
  87.  
  88.           Width of wchar_t string: 'Hello there!' is: 12
  89.  
  90.  
  91. 4.  How to compile the sample program
  92. =====================================
  93.  
  94. NOTE: The sample program is already compiled for you.  If you want to see the
  95.  behavior of the program, you can just run it.  The following instructions
  96.  are needed only if you want to modify the program and recompile it.
  97.  
  98. To compile the sample application:
  99.  
  100.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  101.         correctly on your system.
  102.  
  103.      2) cd to the directory which contains the info source files.
  104.  
  105.      3) Type "build" at the command prompt.
  106.