Skip to content

utf8应该检测0xc080这种非法编码 #1

@xjdrew

Description

@xjdrew

根据rfc3629,每个字符只有一种有效的utf8编码,0只应该编码成0,不能是0xc080;

ref:http://tools.ietf.org/html/rfc3629

  1. Determine the number of octets required from the character number
    and the first column of the table above. It is important to note
    that the rows of the table are mutually exclusive, i.e., there is
    only one valid way to encode a given character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions