From: Axel Etzold Date: 2007-11-04T19:09:22+09:00 Subject: Re: Unicode illegal characters problem -------- Original-Nachricht -------- > Datum: Sun, 4 Nov 2007 17:06:38 +0900 > Von: 7stud -- > An: ruby-talk@ruby-lang.org > Betreff: Re: Unicode illegal characters problem > Axel Etzold wrote: > > > > With respect to the code you sent me, I > > get: > > > > require 'iconv' > > > > s = "caf\xc3\xa9" #(having removed underscores) > > > > First of all, even posting messages about unicode is hard to do because > you have no idea what the other person is seeing. For instance, when > you say 'I see this output: > > caf� Dear 7stud, > > you have no idea how my display device is displaying those characters, > and I have no idea how your display device is displaying those > characters. Does your display device not understand the encoding so > there is a question mark at the end: caf?, and my display device does > understand the encoding, so I see an 'e' with acute'? Or, do you see an > 'e' with acute, but I see a question mark? You just can't be sure what > the other person is seeing. I used underscores intermingled with my > character encodings to prevent *any* display device from rendering them. > That way anyone reading the code will know exactly what's there. > > As a result, to be clear what's going on, you don't want to be posting: > > s = "caf\xc3\xa9" #(having removed underscores) > Well thanks for pointing that out, but that's not a problem here and cannot be, as I just posted some code snippet to tell what I was doing to get that result -- as it originally came from you, you can't possibly misunderstand it, can you ? > You want to leave the underscores in when posting about character > encodings. Of course, when you run the code, you need to remove the > underscores. I am intelligent enough to understand this -- the comment was just to say that I indeed did remove those underscores. :) > > > > > What system are you on ? > > Mine is Linux OpenSuse 10.2, 64bit, Ruby 1.8.6. > > If I had your behaviour on my system, this transliteration > > would provide a nice conversion of the accents to Latex, > > mac os x 10.4.7, pre-installed ruby 1.8.2 So there seems to be some different behaviour of iconv (Ruby and Linux/Unix) for different OS, independently from actual or possible rendering issues, which is what Jonathan, Carlos and I found in our previous discussion. Nice to know that, nevertheless. :-| I'd like to say thanks to all of you for your posts. Best regards, Axel -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail