just1
V2EX  ›  问与答

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

  •  
  •   just1 · Jun 7, 2016 · 2026 views
    This topic created in 3802 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
    just1
    OP
    Jun 7, 2016
    1
    LRM 是看不见的,直接复制就好
    oott123
    oott123
    Jun 7, 2016❤️1
    2
    Unicode LRM 是 U+200E ,在 UTF-8 里是 E2 80 8E
    而 ? 这个符号是 3F (也就是你说的 63 )。

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