Home |
Windowing Interface Terminology Unicode |
UnicodeAn application that wants to use the Unicode version of RTPEG-32 must define C/C++ preprocessor symbol PEG_UNICODE. This will cause type PEGCHAR to resolve to type wchar_t. In addition, a few symbols and functions are defined to ease string handling of the application. Macro PTEXT() can be used to define a string with the correct type, depending on symbol PEG_UNICODE. The following string manipulation functions declared in Include\Pegtypes.hpp can be used as a replacement of corresponding run-time system functions: PegStrCat, PegStrnCat, PegStrCpy, PegStrnCpy, PegStrCmp, PegStrnCmp, PegStrLen, PegAtoL, PegAtoI. The Unicode version of RTPEG-32 processes Unicode keyboard input and does not use input code page 1252 as its ASCII counterpart. For example, the Euro symbols (AltCar-E in most national keyboard drivers) is returned as hex value 20ACh in Unicode apps and as 80h in ASCII apps. To support other 16-bit character sets in use by some systems, the Unicode version of RTPEG-32 has functions to convert between Unicode and the SJIS (Shift Japanese Industrial Standard) as well as the BIG5 character set. RTPEG-32 Unicode applications must link library Pegu.lib instead of Peg.lib. The Win32 emulation library is contained in Peguw32.lib and Pegu.lib. Demo programs PegDemo and Multilang compile unmodified as either ASCII or Unicode applications. Demo program Multilang shows how a multi-language application can be implemented. Please refer to their respective makefiles for further details.
|