Request for help w/porting strings (8bit) to (16bit) strings...
Frotz
frotz at drivax.UUCP
Tue Sep 26 11:43:53 AEST 1989
aic at mentor.cc.purdue.edu (George A. Basar) writes:
>In article <251AB160.3031 at drivax.UUCP>, frotz at drivax.UUCP (Frotz) writes:
>>
>> All of the manuals that I have for this are very clear on the
>> function of these calls. However, it does not give me any clue as to
>> WHY I should use them... Any help would be greatly appreciated.
>>
> The 'why' use of these routines is to ensure compatability on
>machines running DBCS(double byte character set) display devices. This makes
>your application (relatively) easily portable to DBCS machines.
> The 'where' use of these routines, is on any data that may be displayed
>by your application. This includes strings, but is not limited to them. For
>national language compatability you should also consider date and monetary
>formats.
Sorry. Perhaps I misused the word 'why'. I understand that
these services are for internationalization. My question, restated,
is "When do you use wctomb() and mbtowc()?". "In what order do you
use these routines?". Perhaps a psuedo-code-fragment would help.
For a frame work, take this situation. I have a small set of
embedded strings (everything else has been externalized).
Why/How/When do I need to convert to a 'wide-char' or
'multi-byte-string' and when/how/why do I convert back?
I understand that Kanji characters are a series of
<character><modifier> sequences, my question is are these characters
wide-chars or are they multi-byte strings?
Finally, does anyone have any warnings about porting to 16-bit
languages? I have heard mention about checking to see if your
character is really the character you want and not a modifier. Any
other problems?
--
Frotz
More information about the Comp.lang.c
mailing list