* On second thought, ignoring those characters make more sense than writing
basically garbage to the name. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31715 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -167,7 +167,9 @@ to_ucs2(const char *from, size_t fromLength, uint16 *to, size_t maxToLength)
|
||||
size_t index = 0;
|
||||
while (from[0] && index < maxToLength) {
|
||||
// TODO: handle characters that are not representable in UCS-2 better
|
||||
to[index++] = UTF8ToCharCode(&from);
|
||||
uint32 code = UTF8ToCharCode(&from);
|
||||
if (code < 0x10000)
|
||||
to[index++] = code;
|
||||
}
|
||||
|
||||
if (index < maxToLength)
|
||||
|
||||
Reference in New Issue
Block a user