just1
V2EX  ›  问与答

一个 ascii 对应 2 个不同的字符?

  •  
  •   just1 · Jun 7, 2016 · 1697 views
    This topic created in 3636 days ago, the information mentioned may be changed or developed.

    unicode 控制字符 LRM 的 ascii 为 63 ord('‎') '?'的 ascii 也为 63 ord('?') 这是为什么

    还有,怎么识别 unicode 控制字符,遇到该如何处理

    4 replies    2016-06-08 01:32:04 +08:00
    just1
        1
    just1  
    OP
       Jun 7, 2016
    LRM 是看不见的,直接复制就好
    oott123
        2
    oott123  
       Jun 7, 2016   ❤️ 1
    Unicode LRM 是 U+200E ,在 UTF-8 里是 E2 80 8E
    而 ? 这个符号是 3F (也就是你说的 63 )。

    一个 Unicode 字符无法用一个 ascii 码表示。
    just1
        3
    just1  
    OP
       Jun 7, 2016 via Android
    @oott123 感谢
    SoloCompany
        4
    SoloCompany  
       Jun 8, 2016
    楼主太逗了,这叫乱码
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   959 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 19:25 · PVG 03:25 · LAX 12:25 · JFK 15:25
    ♥ Do have faith in what you're doing.