ASCII中的双引号 [英] Double Quotes in ASCII

查看:642
本文介绍了ASCII中的双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

双引号的ASCII码是什么? ()

What is the ASCII number for the double quote? (")

还可以在任何地方找到列表的链接吗?

Also, is there a link to a list anywhere?

最后,如何将其输入C系列(尤其是C#)

Finally, how do you enter it in the C family (esp. C#)

推荐答案

引号的ASCII码是34.

The ASCII code for the quotation mark is 34.

(嗯,严格来讲,这不是真正的引号,而是我们通常用作引号的英寸.A

(Well, strictly speaking it's not a real quotation mark but the inches mark that we commonly use as quotation mark. A real quotation mark is a typographical character that is not available in ASCII.)

网络上有很多 ASCII表.请注意,有些描述了标准的7位ASCII代码,而另一些描述了作为ASCII超级集的各种8位扩展.

There are plenty of ASCII tables on the web. Note that some describe the standard 7-bit ASCII code, while others describe various 8-bit extensions that are super-sets of ASCII.

要将引号放在字符串中,请使用反斜杠将其转义:

To put quotation marks in a string, you escape it using a backslash:

string msg = "Let's just call it a \"duck\" and be done with it.";

要在字符文字中加上引号,您无需对其进行转义:

To put a quotation mark in a character literal, you don't need to escape it:

char quotationMark = '"';

注意:C#中的字符串和字符不是ASCII,而是Unicode.由于Unicode是ASCII的超集,因此代码仍然可用.您可能需要一个Unicode字符表来查找某些字符,但是ASCII表对于大多数常见字符都可以正常工作.

Note: Strings and characters in C# are not ASCII, they are Unicode. As Unicode is a superset of ASCII the codes are still usable though. You would need a Unicode character table to look up some characters, but an ASCII table works fine for the most common characters.

这篇关于ASCII中的双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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