mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Small tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17653 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8a28db5d0
commit
703a88435f
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2003-09-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/Unicode.m: Fix minor errors in utf8 handling.
|
||||||
|
|
||||||
2003-09-10 David Ayers <d.ayers@inode.at>
|
2003-09-10 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepBase/GSObjCRuntime.h (GSObjCSuper):
|
* Headers/Additions/GNUstepBase/GSObjCRuntime.h (GSObjCSuper):
|
||||||
|
|
|
@ -1640,7 +1640,7 @@ GSFromUnicode(unsigned char **dst, unsigned int *size, const unichar *src,
|
||||||
u1 = ((u1 & 0xff00 >> 8) + ((u1 & 0x00ff) << 8));
|
u1 = ((u1 & 0xff00 >> 8) + ((u1 & 0x00ff) << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* possibly get second character and caculate 'u' */
|
/* possibly get second character and calculate 'u' */
|
||||||
if ((u1 >= 0xd800) && (u1 < 0xdc00))
|
if ((u1 >= 0xd800) && (u1 < 0xdc00))
|
||||||
{
|
{
|
||||||
if (spos >= slen)
|
if (spos >= slen)
|
||||||
|
@ -1653,11 +1653,12 @@ GSFromUnicode(unsigned char **dst, unsigned int *size, const unichar *src,
|
||||||
u2 = src[spos++];
|
u2 = src[spos++];
|
||||||
if (swapped == YES)
|
if (swapped == YES)
|
||||||
{
|
{
|
||||||
u2 = ((u1 & 0xff00 >> 8) + ((u1 & 0x00ff) << 8));
|
u2 = ((u2 & 0xff00 >> 8) + ((u2 & 0x00ff) << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((u2 < 0xdc00) && (u2 > 0xdfff))
|
if ((u2 < 0xdc00) && (u2 > 0xdfff))
|
||||||
{
|
{
|
||||||
|
spos--;
|
||||||
result = NO;
|
result = NO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1709,7 +1710,7 @@ GSFromUnicode(unsigned char **dst, unsigned int *size, const unichar *src,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned i;
|
int i;
|
||||||
unsigned char reversed[8];
|
unsigned char reversed[8];
|
||||||
|
|
||||||
/* split value into reversed array */
|
/* split value into reversed array */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue