discuss-gnustep
[Top][All Lists]
Advanced

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

Re: UTF8 encoding!


From: Richard Frith-Macdonald
Subject: Re: UTF8 encoding!
Date: Tue, 2 Oct 2001 13:05:46 +0100

On Tuesday, October 2, 2001, at 11:12 AM, ramana rao wrote:

 
Hi All,
 
    We are using GNUstep lates snapshot ffrom CVS as it is on 26 th september. But we are getting problems with UTF8 encoding when encounters JIS characters, can anybody give a clue on this. The following some detailed description of this problem

The example you showed didn't demonstrate a failure to read UTF8 ... it showed NSLog() failing to output UTF8. The NSLog code was attempting to log the message it was given as ascii. I have modified it to log
UTF8 if it can't convert the message to ascii.

However ... I'm not sure what the correct behavior is. Should NSLog() be trying to log messages as 8-bit
data using the default string encoding?

Perhaps it should go like this -

Can the message be converted to ascii?
  If so, log ascii data
Can the message be converted to the default cString encoding?
  If so, log 8-bit data in the default encoding
otherwise, log UTF8

Anyone know?



reply via email to

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