home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv104.zip / SAMPLE / WCONV / READ.ME < prev    next >
Text File  |  1996-02-13  |  3KB  |  103 lines

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