[Python-Dev] Is this safe enough? Re: [Python-checkins] cpython: _Py_Identifier are always ASCII strings (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Tue Feb 7 22:38:44 CET 2012
- Previous message: [Python-Dev] Is this safe enough? Re: [Python-checkins] cpython: _Py_Identifier are always ASCII strings
- Next message: [Python-Dev] [Python-ideas] matrix operations on dict :)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Does C99 specify the encoding? Can we expect UTF-8?
No, it's implementation-defined. However, that really doesn't matter much for the macro (it does matter for the Mercurial repository):
The files on disk are mapped, in an implementation-defined manner, into the source character set. All processing is done there, including any stringification. Then, for string literals, the source character set is converted into the execution character set. So for the definition of the _Py_identifier macro, it really matters what the run-time encoding of the stringified identifiers is.
Python is supposed to work on many platforms ans so support a lot of compilers, not only compilers supporting non-ASCII identifiers.
And your point is?
Regards, Martin
- Previous message: [Python-Dev] Is this safe enough? Re: [Python-checkins] cpython: _Py_Identifier are always ASCII strings
- Next message: [Python-Dev] [Python-ideas] matrix operations on dict :)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]