Java 如何使用记事本++(Unicode到字符范围)查找(Unicode:0x1)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22703648/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 17:23:33  来源:igfitidea点击:

How do I find (Unicode: 0x1) using notepad++ (unicode to char range)

javaunicodecharacter-encodingnotepad++

提问by user4127

I keep getting this exception in the logs Parsing error, line 1230, uri null An invalid XML character (Unicode: 0x1)

我在日志解析错误中不断收到此异常,第 1230 行,uri null 无效的 XML 字符(Unicode:0x1)

sadly I don't have access to the actual xml and the entire xml is printed in a single line as part of the stackchase

遗憾的是,我无法访问实际的 xml,并且整个 xml 作为 stackchase 的一部分打印在一行中

how do I use notepad++ to search for Unicode 0x1 ?

我如何使用记事本++来搜索 Unicode 0x1 ?

I read that one can search using notepad++ character range. and 0x1 can be convert to char range.

我读到可以使用记事本++字符范围进行搜索。并且 0x1 可以转换为字符范围。

Can someone explain to me how to conver it?

有人可以向我解释如何转换吗?

采纳答案by user694733

Set search mode to Regular expressionand search for \x01.

将搜索模式设置为Regular expression并搜索\x01

Note that you didn't specify which Unicode character encoding this is (UTF-8, UTF-16, etc.). If you open the log file in wrong encoding, search might not work. This could happen if your xml file and log file have different encodings.

请注意,您没有指定这是哪种 Unicode 字符编码(UTF-8、UTF-16 等)。如果您以错误的编码打开日志文件,搜索可能不起作用。如果您的 xml 文件和日志文件具有不同的编码,则可能会发生这种情况。