[Python-3000] Support for PEP 3131 (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Thu May 24 20:50:28 CEST 2007


FWIW the Ruby interpreter (1.8.5) seems to require this flag to allow you to turn on the Japanese code set.

-Kkcode specifies KANJI (Japanese) code-set I have no idea whether or not this cripples the feature in Ruby, and perhaps it's an apples/oranges comparison.

If you don't have source encoding declarations (like the one in PEP 263), you must have some means of setting the source encoding; this is what -Kkcode does (similar to javac's -encoding command line option).

This approach has several flaws, e.g. you can only specify a single encoding, which breaks if you have modules in different encodings.

In any case, it's different from the suggested -UU option: Python already knows what the source encoding is, -UU would not change that. Instead, that option would merely serve to constrain the source code (if it's not being passed).

Regards, Martin



More information about the Python-3000 mailing list