Ad
  • Custom User Avatar

    I had no problems with Unicode in Python at all... Worked like a charm.

  • Default User Avatar

    Thanks for the followup. Character order is definitely one of those things that can be highly dependent on locale, so the original tests were designed to make order ambiguous for some test cases. The Unicode tests don't even use the full Japanese syllabaries.

    If you're working on a highly local solution -- it might make sense to use the ord function for performance reasons. General purpose computations, on the other hand, rely on the essence of the symbols themselves rather than their semi-arbitrary representations. The scope of what anyone can represent in a binary system is very impressive. ASCII and Unicode are one way, but there are also plenty of other character sets based on other systems.

    Also, flagged your response as a spoiler.

  • Default User Avatar

    I'm a bit of a Python newbie so I don't know the particulars of Unicode in Python. I'm still glad someone else provided a Python interpretation in addition to my Javascript interpretation. The general concept is to replace a single character with another. In Unicode, a single character can be represented by multiple bytes, so you need to ensure that whatever functionality you're using will interpret a pure unicode character rather than a single byte. Historically, many string functions have looked at single-byte characters rather than multi-byte characters. I know this is beating around the bush, but hopefully it will help you find the right direction.