bug-gnustep
[Top][All Lists]
Advanced

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

Re[2]: Log Bug ?


From: Manuel Guesdon
Subject: Re[2]: Log Bug ?
Date: Mon, 18 Mar 2002 19:56:46 +0100 (CET)

On Mon, 18 Mar 2002 12:45:48 +0100 Björn Gohla <b.gohla@gmx.de> wrote:

 >| On Monday 18 March 2002 12:18, Manuel Guesdon wrote:
 >| > Hi,
 >| >
 >| > When I log (with NSDebugFLog or NSDebugLog) string with characters like é,
 >| > I get strange characters: é
 >| >
 >| > He is an example:
 >| >     NSString* aTest=[NSString stringWithString:@"é"];
 >| >     NSString* aTest2=[NSString stringWithFormat:@"%@",@"é"];
 >| >     [aTest writeToFile:@"/tmp/zz"
 >| >            atomically:NO];
 >| >     NSDebugFLog(@"%@",aTest);
 >| >     [aTest2 writeToFile:@"/tmp/zz2"
 >| >            atomically:NO];
 >| >     NSDebugFLog(@"%@",aTest2);
 >| >
 >| > /tmp/zz and /tmp/zz2 are good but not the traces.
 >| >
 >| > BTW, I have GNUSTEP_STRING_ENCODING=NSISOLatin1StringEncoding in my env.
 >| 
 >| this looks like the output is utf encoded while your terminal is in single 
 >| byte mode. 

I don't think so:
        When I read on the same term /tmp/zz2 and the log file there's a 
difference.

I've found another problem:
    NSString* aTest=[NSString stringWithString:@"é"];
    NSMutableDictionary* dict=[NSMutableDictionary dictionaryWithObject:aTest
                                                   forKey:aTest];
    [dict writeToFile:@"/tmp/zz3"
           atomically:NO];
create a zz3 file like this:
        {
                "\U00e9" = "\U00e9";
        }
and not like this
        {
                "é" = "é";
        }

I think it's related to "locale" (descriptionWIthLocale)  but can't find code 
to really deal with this in NSString.m

Manuel
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <mguesdon@oxymium.net>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0999  -  Fax: +33 1 4940 0998




reply via email to

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