On Fri, May 03, 2013 at 10:07:30AM +0200, Edwin van den Oetelaar wrote: > #! /usr/bin/env python > # -*- coding: utf-8 -*-
That the vim (or emacs or both) magic string, which can set a lot of stuff (also indentation parameters) > The encoding should be on first or second line, so the python parsers > (and editors) can find it. > > I found this reference : > http://stackoverflow.com/questions/688760/how-to-create-a-utf-8-string-literal-in-visual-c-2008 Ouch... thats *very* VC specific :D > String Literals are '.DATA' and should not bring trouble to '.CODE', > so escaping is fine with me. This is one of the reason for C being encoding agnostic. However, even escaping, the compiler has to know from which encoding the stuff come. For example, the Unicode F2 and F3 codepoints (latin small letter O with grave and acure) (should be there: òó very useful for angry faces:D) if used under, well, EBCDIC becomes the 2 and 3 digits :D Of course every other encoding and codepage would have different stuff there. So, '\xF2' and '\u00F2' are *definitely* not the same thing: the first one is the bit pattern 11110010, the second one is the unicode char latin small letter O with grave which will the be compiled in the 'appropriate' representation for the target machine. Anyway, localisation and character encoding is a mess (anywhere) > I work with VT-100 terminal-editor (remote support over slow > connection) lots of times, and can not display all these strange > characters. Me too, a lot of vim under xterm. However at least it understands UTF8. -- Lorenzo Marcantonio Logos Srl _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

