Re: NSString and Unicode and Japanese character encodings
Re: NSString and Unicode and Japanese character encodings
- Subject: Re: NSString and Unicode and Japanese character encodings
- From: John Stiles <email@hidden>
- Date: Thu, 25 Aug 2005 13:26:15 -0700
What actual problem are you experiencing?
There are certainly cases where things do not round-trip in and out
of Unicode and remain bit-identical. This doesn't particularly mean
Unicode is unsuitable as a general-purpose encoding.
On Aug 25, 2005, at 12:33 PM, Izidor Jerebic wrote:
Much to my big surprise I read on Ruby mailing list that Unicode is
not appropriate for general character encoding, in particular it
fails to support existing Japanese encodings, among other problems.
One of the problems is that Japanese Shift-JIS encoding does not
map one-to-one to Unicode. There are Shift-JIS codes that do not
survive round-trip to Unicode and back to Shift-JIS - you get back
a different one than the starting one.
There are some pages describing this (and other) problems in
Japanese encodings:
<http://support.microsoft.com/default.aspx?scid=kb;en-us;Q170559>
<http://www.miraclelinux.com/english/technet/samba30/
iconv_issues.html>
My question is: do NSString and NSText cope with this? Is it safe
to use NSString and assume that using initWithData:encoding: and
then modifying that string (e.g. inserting something) and than
using dataUsingEncoding: will get me back the same characters if
encoding is Shift-JIS?
If they convert internally to Unicode, we have a problem. Or not?
And obviously we are not supposed to extract and insert Unicode
chars, but only NSStrings (using substringWithRange: methods)? Or
what?
Anybody?
izidor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden