I also realize the question is somewhat subjective. (Please don't close it on that grounds: I'm actually linking to several SO threads which I found unsatisfying.) But... as a user of any of these languages, how well do they support unicode in practice?推荐答案 Python的unicode支持在3.x中并未真正改变.自Python 2.x以来,Python中的unicode support 几乎相同,后者引入了单独的unicode类型和编码处理. Python 3.x的变化是unicode成为唯一的字符串类型(并重命名为str),而2.x具有字节字符串(str,"...")和unicode字符串(unicode,u"...") ),但经常(但并非总是)不太混合. (允许它们混合使用是一种尝试,以简化从字节串到unicode的转换,但是结果却是一个错误.)总而言之,尽管在Python 2.x中存在错误,Python的unicode支持还是相当不错的.有带数字和命名转义符的unicode文字,unicode文字中非ASCII字符的源编码声明,通过codecs模块的自动编码/解码,许多库中的unicode支持(如正则表达式和DB-API模块)以及内置的unicode数据库.Python's unicode support did not really change in 3.x. The unicode support in Python has been pretty much the same since Python 2.x, which introduced the separate unicode type and the encoding handling. What Python 3.x changes is that unicode becomes the only string type (and is renamed to str), whereas 2.x has bytestrings (str, "...") and unicode strings (unicode, u"...") that often but not always don't quite mix. (Allowing them to mix was an attempt to make transitioning from bytestrings to unicode easier, but it turned out a mistake.) All in all, Python's unicode support is quite good, mistakes in Python 2.x notwithstanding. There's unicode literals with numeric and named escapes, source-encoding declarations for non-ASCII characters in unicode literals, automatic encoding/decoding through the codecs module, unicode support in many libraries (like the regular expression and DB-API modules) and a builtin unicode database.也就是说,您 still 还需要了解编码,以便正确处理文本.您的程序将以某种编码方式(从文件,环境变量或通过其他输入)接收字节,并且需要以该编码方式对其进行解释.如果您不知道编码(并且无法根据数据确定编码,例如HTML或XML),则实际上只能将数据作为字节进行处理.如果您知道编码,Python确实可以让您透明地对其进行处理.That said, you still need to know about encodings in order to handle text correctly. Your program will receive bytes in some encoding (be it from files, from environment variables or through other input) and they will need to be interpreted in that encoding. If you don't know the encoding (and can't determine it from the data, like in HTML or XML) you can really only process the data as bytes. If you do know the encoding, Python does allow you to deal with it mostly transparently. 这篇关于您的语言在实践中对unicode的支持程度如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!