unicode - 为什么当我使用 (Apple 标志)unicode 时 Julia 返回 "\uf8ff"?

标签 unicode fonts character-encoding julia glyph

我认为 Julia 支持原始 unicode 输入,例如:

julia> test = "π£¢∞§"
"π£¢∞§"

julia> 😘 = 1 ;

julia> print(😘 )
1

不过julia好像不支持(Apple logo)

julia>  = 123
ERROR: syntax: invalid character ""

julia> test = ""
"\uf8ff"

我想知道这背后的原因是什么,是否有办法在 Julia 中使用  字符?

最佳答案

我相信this链接更正确地解释了您看到的苹果 Logo 的 unicode 字符的大小写。

The problem is that the unicode value used is one of several that is set aside for private use. That means that each operating system, or application, or implementation is free to use those unicode characters for anything they want. It just so happens that Apple has chosen to use unicode character U+F8FF (decimal value 63743, or on the web as either  or ) as the Apple Logo. But some Windows fonts put in a Windows logo. And some other fonts put in a Klingon Mummification glyph. Or elven script. Or anything they want. And if it isn't defined in your local font, you'll just see a square.

我的观点是 Julia 根本没有将这个特殊值用于任何事情。这也解释了为什么您的“π£¢∞§”字符可以很好地工作 - 它们是正确的 unicode 字符,更多地受到不同平台的支持。

作为旁注,我在这个实例上也看到了一个简单的正方形而不是苹果 Logo 。

编辑

Here是 Julia 支持的 unicode 字符列表。

关于unicode - 为什么当我使用 (Apple 标志)unicode 时 Julia 返回 "\uf8ff"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39679584/

相关文章:

python - 获取 magic line/shebang 中指定的编码(从模块内)

objective-c - NSString - Unicode 到 ASCII 等价物

python - 为什么我不能在 Mac OS X Terminal.app 的 Python Interpreter 中显示 unicode 字符?

ios - 在 iOS 5.x 的 UITextView 中增加表情符号字符的字体大小

html - UIWebView 上的自定义字体仅更改数字的字体

java - 获取字符集时流关闭错误

c++ - 对 UTF-8 字符串进行排序?

windows - TextPad 和 Unicode : full support?

iphone - lineHeight 和领先之间有什么区别?

ruby - 清理 ruby​​ 中的奇怪编码