Byte string literal with non-ascii characters

Viewed 6502

Apparently, I can do that in Python 2.7:

value = '國華'

It seems Python is using an encoding to encode the characters in the string literal to a byte string. What is that encoding? Is that the encoding defined in sys.getdefaultencoding(), the encoding of the source file, or something else?

Thanks

2 Answers
Related