How do I translate 8bit characters into 7bit characters? (i.e. Ü to U)

前端 未结 15 2019
旧时难觅i
旧时难觅i 2020-12-05 10:29

I\'m looking for pseudocode, or sample code, to convert higher bit ascii characters (like, Ü which is extended ascii 154) into U (which is ascii 85).

My initial gues

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 11:12

    Most languages have a standard way to replace accented characters with standard ASCII, but it depends on the language, and it often involves replacing a single accented character with two ASCII ones. e.g. in German ü becomes ue. So if you want to handle natural languages properly it's a lot more complicated than you think it is.

提交回复
热议问题