
===============================================================================
                  Internationalization (I18N) For OS/2                 
===============================================================================

                Copyright IBM Corporation -- 1993, 1994, 1995

DISCLAIMER: This package is not a full implementation of the X/Open XPG4 
specification and does not make any claims of XPG4 branding. It implements 
only the portions of the XPG4 specification which deal with 
internationalization.

X/Open is a trademark of the X/Open Company Limited.

===============================================================================


/************************/
/***     Contents     ***/
/************************/

1.  Overview
2.  Files in this directory
3.  How to run the sample program
4.  How to compile the sample program


1.  Overview
============

The sample program in this directory demonstrates the APIs for converting
from multibyte characters (char *) to wide characters (wchar_t *), and back
again.  These conversions are important when data is in one format, and
you need it in the other.  Also shown are APIs to determine lengths of various
wide character strings and characters, and the length, in bytes, of multibyte
strings.


2.  Files in this directory
===========================

File            Purpose
------------------------------------------------------------------------------
wconv.c         Source code for the wconv sample program.
wconv.def       Definition file needed for compiling the program.
wconv.mak       Make file used to compile the sample.
wconv.exe       Compiled version of the wconv sample.

build.cmd       A command file which will compile and link the sample program.
read.me         This file.


3.  How to run the sample program
=================================

The following steps show how the program can be run.

     1) Run the \i18n\bin\new_vars command file (or have the environment
        variables already set).

     2) Set the value of either LC_ALL or LANG to: En_US (US English).

          Ex:   set LANG=En_US

     3) Execute the wconv.exe program.

          Ex:   wconv

     4) The output from the program should be:

          Current locale is: ENUS437

          Original string:  Hello there!
          Converted string: Hello there!
          Converted back:   Hello there!

          Original char:  K
          Converted char: K
          Converted back: K

          Length of multibyte character: 'K' is: 1

          Width of wchar_t character: 'K' is: 1

          Width of wchar_t string: 'Hello there!' is: 12


4.  How to compile the sample program
=====================================

NOTE: The sample program is already compiled for you.  If you want to see the
 behavior of the program, you can just run it.  The following instructions
 are needed only if you want to modify the program and recompile it.

To compile the sample application:

     1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
        correctly on your system.

     2) cd to the directory which contains the info source files.

     3) Type "build" at the command prompt.
