Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!drivax!frotz From: frotz@drivax.UUCP (Frotz) Newsgroups: comp.lang.c Subject: Re: Request for help w/porting strings (8bit) to (16bit) strings... Message-ID: <251ED45A.6C60@drivax.UUCP> Date: 26 Sep 89 01:43:53 GMT References: <251AB160.3031@drivax.UUCP> <4190@mentor.cc.purdue.edu> Sender: frotz@drivax.UUCP Reply-To: frotz@drivax.UUCP Distribution: usa Organization: Digital Research, Monterey CA Lines: 38 aic@mentor.cc.purdue.edu (George A. Basar) writes: >In article <251AB160.3031@drivax.UUCP>, frotz@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 ofsequences, 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