[英]ASCII Space Character in Ruby Unicode Escape
Doing some reading and came across this block of code on the topic of Unicode Escapes in Ruby: 做一些阅读,并遇到了有关Ruby中Unicode Escapes主题的这段代码:
money = "\\u{20AC 20 A3 20 A5}" # => "€ £ ¥"
I understand that in this ruby syntax, the actual spaces between the {}
's doesn't output an encoded space, that's the reason for the code point 20
but what I don't understand is why there's a code point 20
at the very beginning of the {}
, right after the \\u\u003c/code> .
我知道在这种ruby语法中,
{}
之间的实际空格不会输出编码后的空格,这就是代码点20
的原因,但是我不明白的是为什么在这点上有一个代码点20
{}
开始,在\\u\u003c/code> 。
No space has been output in the result and I copied it verbatim from the book.
结果中没有输出空间,我从书中逐字复制了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.