What's the ASCII character code for '—'

2019-02-16 05:56发布

I am working on decoding text. I am trying to find the character code for the character, not to be mistaken for -, in ASCII. I have tried unsuccessfully. Does anybody know how to convert it?

4条回答
迷人小祖宗
2楼-- · 2019-02-16 06:26

This character does not exist in ASCII, but only in Unicode, usually encoded by UTF-8.

In UTF-8, characters are encoded by 2- or 3-byte sequences (or occasionally longer), where none of the two or three bytes is a valid ASCII code, where all of them are outside the ASCII range of 0 through 127.

One suspects that the foregoing only partly answers your question, but if so then this is probably because your question is, inadvertently, only partly asked. For further details, you can extend your question with more specifics.

查看更多
劳资没心,怎么记你
3楼-- · 2019-02-16 06:46

I use this online tool to do so. Put your character into the first green box and click "Convert" (above the box)

further below you find a box titled U+hex containing your answer:

U+2014


Feel free to edit this answer if the link breaks or leave a comment so I can find a replacement.

查看更多
孤傲高冷的网名
4楼-- · 2019-02-16 06:47

is known as an Em Dash. It's character code is \u2014. It is not an ASCII character, so you cannot decode it with the ASCII character set because it is not in the ASCII character table. You would probably want to use UTF8 instead.

查看更多
仙女界的扛把子
5楼-- · 2019-02-16 06:50

Quotation from wiki (Em dash)

When an actual em dash is unavailable—as in the ASCII character set—a double ("--") or triple hyphen-minus ("---") is used. In Unicode, the em dash is U+2014 (decimal 8212).

Em dash character is not a part of ASCII character set.

查看更多
登录 后发表回答