Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Julia returns "\uf8ff" when I use  (Apple logo) unicode?

I thought Julia supports raw unicode input, such as:

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

julia> 😘 = 1 ;

julia> print(😘 )
1

However, it seems julia does not support  (Apple logo).

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

julia> test = ""
"\uf8ff"

I wonder what's the underlying reason for that, and whether there is a way I can use  character in Julia?

like image 887
Jay Wong Avatar asked Dec 04 '25 17:12

Jay Wong


1 Answers

I believe this link more properly explains the case of the unicode character that you see as apple's logo.

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.

My opinion is that Julia simply doesn't use this special value for anything. This also explains why your "π£¢∞§" characters work nicely - they are proper unicode characters, more largely supported by different platforms.

As a side note, i too see a simple square instead of the apple logo on this instance.

Edit

Here is a list of unicode characters supported by Julia.

like image 71
Alex A Avatar answered Dec 06 '25 13:12

Alex A



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!