help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: encoding problems


From: Richard Frith-Macdonald
Subject: Re: encoding problems
Date: Sun, 29 Jun 2003 15:43:30 +0100


On Sunday, June 29, 2003, at 03:12  pm, reuss wrote:

i have an ascii textfile, delimited by '|', on the left side, there is
words that should be in latin1 encoding and the right side words that should be latin2
encoding
i read the entire file in an NSString (myString),

That's a mistake ... if you read it in as a single NSString, you must be reading it
as a single encoding ... but you've just said it's two encodings.
You should read it as an NSData instead.
Then you split the NSData up into chunks, and use NSStrings initWithData;encoding:
method to create string in the appropriate encodings.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]