Unicode etc...
Solved
KX
Posted messages
19031
Status
Modérateur
-
KX Posted messages 19031 Status Modérateur -
KX Posted messages 19031 Status Modérateur -
Hello,
I recently discovered a website that allows you to retrieve Unicode symbols based on their shape. The problem is that it worked fine yesterday when I tested it on Linux, but today on Windows I only see squares instead of, for example, the emojis from this page:
http://shapecatcher.com/unicode/block/Emoticons.html
So I'm wondering about the difference in Unicode format that might exist between the two systems, or whether there is a configuration that could be done to access this content on Windows just like on Linux...
Thank you in advance!
--
Trust does not exclude control
I recently discovered a website that allows you to retrieve Unicode symbols based on their shape. The problem is that it worked fine yesterday when I tested it on Linux, but today on Windows I only see squares instead of, for example, the emojis from this page:
http://shapecatcher.com/unicode/block/Emoticons.html
So I'm wondering about the difference in Unicode format that might exist between the two systems, or whether there is a configuration that could be done to access this content on Windows just like on Linux...
Thank you in advance!
--
Trust does not exclude control
1 réponse
Hello,
You need a UTF-8 font in which the characters are present; otherwise, they will not be displayed.
In the font pack provided on the site you mentioned, there is the DejaVu 2.33 font, and in the unicover file, you can see what is covered by the font, and on the emoticons line:
U+1F600 Emoticons 80% (51/63) (0/63) (0/63)
Only 51/63 are done and only in the "Sans" mode.
So, it's not a problem of difference in Unicode format (UTF-8 remains UTF-8) if the page is indeed in UTF-8 with the specified font and the OS has the font, it should display the characters correctly.
On the page, the problem is that the font is not specified; on my end, under Windows 7 with Opera, it doesn't display them. I think under Linux the default font is DejaVu, so you don't have the problem. To remedy this, you need to add the font-family to use in the CSS, for example:
font-family: "DejaVu Sans", Helvetica, Helvetica Neue, Arial, sans-serif;
and that works.
You need a UTF-8 font in which the characters are present; otherwise, they will not be displayed.
In the font pack provided on the site you mentioned, there is the DejaVu 2.33 font, and in the unicover file, you can see what is covered by the font, and on the emoticons line:
U+1F600 Emoticons 80% (51/63) (0/63) (0/63)
Only 51/63 are done and only in the "Sans" mode.
So, it's not a problem of difference in Unicode format (UTF-8 remains UTF-8) if the page is indeed in UTF-8 with the specified font and the OS has the font, it should display the characters correctly.
On the page, the problem is that the font is not specified; on my end, under Windows 7 with Opera, it doesn't display them. I think under Linux the default font is DejaVu, so you don't have the problem. To remedy this, you need to add the font-family to use in the CSS, for example:
font-family: "DejaVu Sans", Helvetica, Helvetica Neue, Arial, sans-serif;
and that works.
I installed the fonts suggested on the site, and it seems to work in Firefox, but it's still buggy in Chrome. However, I couldn't find how to modify the CSS because when I save the page, it also saves the squares instead of the emojis... But for now, I will stick with Firefox; that should be enough ;-)
<html> <head> <meta charset="UTF-8"> <style type="text/css"> body{font-family:"DejaVu Sans";} </style> </head> <body> Grinning face with smiling eyes: 😁 </body> </html>I used the emoticon code in hex HTML display for hex and without the x for decimal
Edit: it should not be necessary to specify the charset when setting the character encoding to utf8 in HTML, it should only be required when the character is "hard-coded" in UTF-8 format, as on the original page actually. (I'm not very familiar with HTML)
I can't make changes to the HTML page myself...