Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!aic From: aic@mentor.cc.purdue.edu (George A. Basar) Newsgroups: comp.lang.c Subject: Re: Request for help w/porting strings (8bit) to (16bit) strings... Message-ID: <4227@mentor.cc.purdue.edu> Date: 26 Sep 89 22:46:02 GMT References: <251AB160.3031@drivax.UUCP> <4190@mentor.cc.purdue.edu> <251ED45A.6C60@drivax.UUCP> Distribution: usa Organization: Purdue University Lines: 39 > 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 ... > >> WHY I should use them... Any help would be greatly appreciated. > >> > > The 'why' use of these routines is to ensure compatability on ... > > Sorry. Perhaps I misused the word 'why'. I understand that > My mistake, too. Sorry. > > For a frame work, take this situation. I have a small set of ... The Kanji character set(all this info is from doing some NLS work on a Kanji PS/2) is a double byte character set. This means two bytes to represent a single Kanji character. I imagine(conjecture here, I'm unsure of what wide-char is supposed to represent, never heard the term) that the wctomb routines are for reading input, since the input device(keyboard) use display for reading will generate some wide-char representation for dislay, and the mbtowc() routines are for output conversion. > > 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? Along these lines, the standard C string library is not DBCS enabled, For things like strncpy, you have to examine the characters to make sure you won't split a DBCS character. Strcmp to make sure the characters are of the same type, etc. > Frotz * George A. Basar (317)742-8799 (home) * aic@mentor.cc.purdue.edu basar@PURCCVM.BITNET | General Consultant (317)494-1787 (work) | Purdue University Computing Center