help-gnustep
[Top][All Lists]
Advanced

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

Re: encoding problems


From: reuss
Subject: Re: encoding problems
Date: Sun, 29 Jun 2003 15:35:12 GMT
User-agent: Pan/0.11.2 (Unix)

It is impossible to encode my string to latin2 because it contains characters 
appropriated to the latin1 encoding (it is a known problem of hungarian 
language before unicode). for that reason, I opted for reading to NSString to 
replace easaly the four characters that exist either in latin1 either in 
latin2, but with an apparence different. In NSData, I can't see any function 
that helps me to chunk as componentsSeparatedByString: in NSString.

On Sun, 29 Jun 2003 16:43:30 +0200, Richard Frith-Macdonald wrote:


> 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]