[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GSString problem
From: |
Alexander Malmberg |
Subject: |
Re: GSString problem |
Date: |
Mon, 05 Jul 2004 16:51:28 +0200 |
Richard Frith-Macdonald wrote:
> On 5 Jul 2004, at 15:22, Alexander Malmberg wrote:
[snip]
> > Do we really ever want to set the c-string encoding to
> > NSASCIIStringEncoding instead of NSISOLatin1StringEncoding? (Especially
> > since parts of Unicode.m is pretending that ascii==iso-8859-1 anyway.)
>
> I guess we do if the user wants to ...
> ie if GNUSTEP_STRING_ENCODING specifies ASCII
Fair enough, but can you think of any reason why a user would ever do
that? :)
> However, I think it's probably sensible to use ISO-8859-1 if
> GNUSTEP_STRING_ENCODING
> is not defined and nl_langinfo(CODESET) says ASCII
Agreed.
> I wasn't aware that Unicode.m ever pretended ascii==iso-8859-1 ... I
> don't think it should.
GSToUnicode silently accepts input bytes >=128 for
NSASCIIStringEncoding, effectively treating them as iso-8859-1. Not sure
if there are any other places left.
Currently, this has the advantage that stray 8-bit values in eg.
filenames won't cause horrible problems by default. If iso-8859-1 is
made the default again, I think it should be fixed.
- Alexander Malmberg