|
From: | Richard Frith-Macdonald |
Subject: | Re: Summary: Unicode support on GNUstep |
Date: | Sun, 30 Mar 2003 16:57:27 +0100 |
On Thursday, March 27, 2003, at 06:05 pm, Andreas Hoeschler wrote:
Hi all,on my Solaris/GNUstep installation I getNSData *data = [@"Höschler" dataUsingEncoding:NSNonLossyASCIIStringEncoding];NSLog(@"data %@", data); 2003-03-27 18:11:16.829 Test[14953] data (nil)Answering my own question... What I really wanted wasNSData *data = [@"Höschler" dataUsingEncoding:NSUTF8StringEncoding];And this works. I was a bit confused because NSNonLossyASCIIStringEncoding worked on MacOSX. I don't really know why. probbaly because of different default C string encondings on both machines.
I think it must be a MacOS-X bug ... since a conversion to NSNonLossyASCIIStringEncoding should result in an ascii string and o-umlaut cannot be represented in ascii. Possibly the MacOS-X compiler simply strips the top bit of characters in the literal string though?
[Prev in Thread] | Current Thread | [Next in Thread] |