我怎么知道这个字符是什么? [英] How do I figure out what this character is?

查看:111
本文介绍了我怎么知道这个字符是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:显然这些是控制字符,而不是Unicode字符。

Update: Apparently these are control characters, not Unicode characters.

我试图解析一个有奇数字符的XML文件,并且导致我的工具(Firefox,Nokogiri)抱怨。

I'm trying to parse an XML file which has an odd character in it that makes it invalid and is causing my tools (Firefox, Nokogiri) to complain.

这里是Firefox中的字符看起来像什么,当我复制并粘贴到Textmate (我明显在OS X上)。

Here's what the character looks like in Firefox, and what it looks like when I copy and paste it into Textmate (I'm on OS X obviously).

我真的想知道这些字符是什么(例如hex / dec代码),而不仅仅是隐藏的图标和小灰色的钻石,但我不知道如何计算

Rather than just cryptic icons and little grey diamonds I'd really like to know what these characters are (e.g. hex/dec codes) but I'm not sure how to figure that out.

推荐答案

我会将Firefox中的页面保存到一个文件,并将其传递给 hexdump -C 。在ASCII部分中查找其周围的HTML片段,然后查找十六进制字节。最可能的是,这些是UTF-8,因此需要一个多字节代码。

I would save the page in Firefox to a file, and pass it to hexdump -C. Look for the fragment of HTML around it in the ASCII part, then look for the hex bytes. Most likely, these are UTF-8, so expect a multi-byte code.

这篇关于我怎么知道这个字符是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆