From: mortee Date: 2007-10-30T11:15:41+09:00 Subject: Re: to_yaml and international characters Jamal Bengeloun wrote: > Sorry but I do not get it. Plus I am not sure it is only related to > YAML. > > I am working on something similar and the only answers I can relate are > those in Python (such as: > http://www.reportlab.com/i18n/python_unicode_tutorial.html). I mean I > got so far as understanding that: > > é gets translated to \202 > è gets translated to \212 > à gets translated to \205 > ç gets translated to \207 > â gets translated to \203 > ê gets translated to \210 > î gets translated to \214 > ô gets translated to \223 > û gets translated to \226 > ä gets translated to \204 > ë gets translated to \211 > ï gets translated to \213 > ö gets translated to \224 > ù gets translated to \227 > > But why? I guess that your understanding is just wrong. I'm not really sure from where your program gets those accented chars that are translated to those specific escaped octal sequences. But if you're specifying them in string constants in your program, then it all depends on according to what encodig your editor displays it. For instance, I usually edit my scripts as UTF-8 text files, and I treat my sting constants that way too. In that case, if I put an é in a string constant, it gets interpreted as \303\251, and not as \202. It's just the octal representation of the byte(s) your editor displays as a specific accented character. mortee