Request for help w/porting strings (8bit) to (16bit) strings...

George A. Basar aic at mentor.cc.purdue.edu
Wed Sep 27 08:46:02 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
...
> >> 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 at mentor.cc.purdue.edu                     basar at PURCCVM.BITNET    
| General Consultant                   	       (317)494-1787 (work)
| Purdue University Computing Center



More information about the Comp.lang.c mailing list