gpt4 book ai didi

xml - XML 中的 Unicode 字符,如\u0016

转载 作者:数据小太阳 更新时间:2023-10-29 01:40:50 29 4
gpt4 key购买 nike

有没有办法在 XML 中处理像\u0016 这样的 unicode 字符?根据我的理解,在 XMLDocument 中加载此类字符会引发无效的十六进制字符错误。我尝试使用其他 unicode 字符。他们似乎工作正常。只有控制字符会导致此错误。我们可以在不实际解析 XML 的情况下删除这些字符吗?

最佳答案

Characters are denoted using the notation used in the Unicode Standard, that is, an optional U+ followed by their hexadecimal number, using at least 4 digits, such as U+1234 or U+10FFFD. In XML or HTML this could be expressed as ሴ or 􏿽.

来自 Unicode Technical Report .

XML 中的有效字符:

Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

来自 Extensible Markup Language (XML) 1.0 (Fifth Edition)

关于xml - XML 中的 Unicode 字符,如\u0016,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8485436/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com