Various unicode fixes made.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13371 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-04-06 06:33:34 +00:00
parent e32b1545f3
commit 5053fda75a
4 changed files with 102 additions and 58 deletions

View file

@ -1166,12 +1166,12 @@ handle_printf_atsign (FILE *stream,
b = (unsigned char*)[data bytes];
uptr = (unichar*)b;
if (*uptr == 0xFFFE)
if (*uptr == byteOrderMark)
{
b = (unsigned char*)++uptr;
len -= sizeof(unichar);
}
else if (*uptr == 0xFEFF)
else if (*uptr == byteOrderMarkSwapped)
{
b = (unsigned char*)++uptr;
len -= sizeof(unichar);
@ -2376,7 +2376,7 @@ handle_printf_atsign (FILE *stream,
buff = (unichar*)NSZoneMalloc(NSDefaultMallocZone(),
sizeof(unichar)*(len+1));
buff[0] = 0xFEFF;
buff[0] = byteOrderMark;
[self getCharacters: &buff[1]];
return [NSDataClass dataWithBytesNoCopy: buff
length: sizeof(unichar)*(len+1)];