Notes on Internationalization for the Device Communications
Toolkit

In an international environment, strings in
CIMPLICITY software can be multibyte strings. If you want your code
to conform to international standards, GE Fanuc recommends that you
do the following when working with strings:

Use the _tcs () functions
in place of the str () functions. For
example, use _tcslen() in place of strlen().

Be careful when incrementing a
pointer through a string. Remember that a logical character may
occupy one or two TCHAR units. So replace code that looks
like this:

char *cp;

for (cp = string; *cp != '\0'; ++cp)

{

…

}

with code that looks like this:

TCHAR const *cp;

for (cp = string; *cp != _T('\0'); cp =
_tcsinc(cp))

{

…

}

Avoid using a variable to hold the
value of a logical character. Instead, use a pointer to a character
in the string. In particular, avoid the _tcsnextc() macro, because the
value it returns appears to be incompatible with some of the C
runtime library functions.

Use the functions _tccpy() and _tccmp() and string pointers
instead of the =
and ==
operators on characters.

Use GetStringTypeEx() instead of the
character classification macros such as _istalpha().

Microsoft has several good papers on writing
international code on its Developer Network CD and its web site. To
find documentation on the web site, go to
http://msdn.microsoft.com/default.asp and search for MBBCS.

For documentation on globalization, go to
http://www.microsoft.com/globaldev/.