drsdvwsvo78320812 2013-01-29 20:46
浏览 59
已采纳

哪个字符编码是字节0不为空?

Are there are any character encodings in which the 0 byte does not encode null, but encodes a more concatable character? My PHP gives me this list of encodings:

    [0] => pass
    [1] => auto
    [2] => wchar
    [3] => byte2be
    [4] => byte2le
    [5] => byte4be
    [6] => byte4le
    [7] => BASE64
    [8] => UUENCODE
    [9] => HTML-ENTITIES
    [10] => Quoted-Printable
    [11] => 7bit
    [12] => 8bit
    [13] => UCS-4
    [14] => UCS-4BE
    [15] => UCS-4LE
    [16] => UCS-2
    [17] => UCS-2BE
    [18] => UCS-2LE
    [19] => UTF-32
    [20] => UTF-32BE
    [21] => UTF-32LE
    [22] => UTF-16
    [23] => UTF-16BE
    [24] => UTF-16LE
    [25] => UTF-8
    [26] => UTF-7
    [27] => UTF7-IMAP
    [28] => ASCII
    [29] => EUC-JP
    [30] => SJIS
    [31] => eucJP-win
    [32] => SJIS-win
    [33] => CP932
    [34] => CP51932
    [35] => JIS
    [36] => ISO-2022-JP
    [37] => ISO-2022-JP-MS
    [38] => Windows-1252
    [39] => Windows-1254
    [40] => ISO-8859-1
    [41] => ISO-8859-2
    [42] => ISO-8859-3
    [43] => ISO-8859-4
    [44] => ISO-8859-5
    [45] => ISO-8859-6
    [46] => ISO-8859-7
    [47] => ISO-8859-8
    [48] => ISO-8859-9
    [49] => ISO-8859-10
    [50] => ISO-8859-13
    [51] => ISO-8859-14
    [52] => ISO-8859-15
    [53] => ISO-8859-16
    [54] => EUC-CN
    [55] => CP936
    [56] => HZ
    [57] => EUC-TW
    [58] => BIG-5
    [59] => EUC-KR
    [60] => UHC
    [61] => ISO-2022-KR
    [62] => Windows-1251
    [63] => CP866
    [64] => KOI8-R
    [65] => KOI8-U
    [66] => ArmSCII-8
    [67] => CP850
    [68] => JIS-ms
    [69] => CP50220
    [70] => CP50220raw
    [71] => CP50221
    [72] => CP50222
  • 写回答

2条回答 默认 最新

  • duanshan3331 2013-01-29 20:56
    关注

    Any straightforward multibyte encoding (e.g. UTF-16 in all forms) will represent each code point as two bytes, one of which is zero. So for example U+0020 would be represented as 0x00 0x20 (big endian) or 0x20 0x00 (little endian). Similarly any character which is an even product of 256 will have a LSB of 0x00.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败