K&R C定义了几个转义序列(escape sequence)或字符转义(character escape),用于克服这个难题。ANSI C在它的基础上又增加了几个转义序列。
基于16个网页-相关网页
escape character 转义字符 ; 转义符 ; 换码符 ; 换码字符
Single character escape sequences 单字符换码串
Unicode Character Escape Sequences 单码字符转义序列
unrecognized character escape sequence 得不到承认字符序列
Escape Character ESC 逸出字符
data link escape character 数据通信换码字符 ; 数据传输线换码记号 ; 数据链逸出字符 ; 数据链路转义字符
INVALID ESCAPE CHARACTER 非法的逃逸字符
escape control character [计] 换码控制符
When in doubt, if you're having some weird character issue, odds are you need to escape it in some way.
当你有疑问时,如果你有一些奇怪的性格问题,很可能你需要用某种方式来摆脱它。
If this is the case in your repository, then you will have to escape each character before passing it on.
如果您的存储库是这种情况,那么必须对每个字符进行转义,然后再传递。
In most cases, repositories will give an escape character or sequence for these types of special values, and if a value can be escaped by the connector, then it should be.
在大多数情况下,存储库会提供一个转义字符或字符序列,用于对这些特殊值进行转义,如果一个值可以由连接器进行转义,那么应该这么做。
So, when in doubt, if you're having some weird character issue, odds are you need to escape it in some way.
如果你有拿不准的字符,可能就要用到转义字符了。
It gets really kind of trippy if you wanna output a backslash, \ you can't just use the backslash, \\ you need to use backslash backslash because otherwise a single backslash is confused with the so called escape character.
如果你想输出一个反斜杠,估计又得迷糊了,实际上,你不能直接用,而是要,否则一个\可能会被误认为,是转义字符。
So you have what are called escape characters like backslash N that is the shorthand notation of telling the computer put a new line character here.
幸亏我们有一些类似反斜杠n的转义字符,这只是一种简化方式,用来告知电脑要在这新添一行。
应用推荐