de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 UTF-8 encoding (EMOJIS) not working on macOS Catalina
PostPosted: Sat Nov 02, 2019 11:04 pm 
Offline
Regular
UTF-8 encoded characters dont show up on the UI instead a square with a black border is shown as if the characters dont exist in whatever charset is the default.

Either making UTF-8 the default charset or making it configurable from within a script would be good.

Solving that bug would enrich script with emojis.


Top
 Profile Send private message 
 
 Re: UTF-8 encoding (EMOJIS) not working on macOS Catalina
PostPosted: Tue Nov 05, 2019 3:04 pm 
Offline
Site Admin
User avatar
Java uses UTF-16 (very like UTF-8) but limited (2 bytes only) encoding, accepting roughtly 32000 different characters, so it cannot represent all Unicode characters. Emojis are excluded, for example (being in a character set outside this 16 bits set). Summary : if the code is 4 digits long in hexadecimal (like 0x0041 or 0x20ac), it's ok without needing anything more.
For other charaters, like emojis, we need a more complex solution. This code should show an emoji, but it depends on the character font :
Code:
show("Smiley : "+ String.format("%c", 0x1D11E))


Top
 Profile Send private message 
 
 Re: UTF-8 encoding (EMOJIS) not working on macOS Catalina
PostPosted: Wed Nov 06, 2019 9:59 pm 
Offline
Regular
I see I didn't know that. Maybe I can convert the UTF8 encoded string coming from Odin's Master API to UTF16. I'll try this as soon as I have some time.


Top
 Profile Send private message 
 
 Re: UTF-8 encoding (EMOJIS) not working on macOS Catalina
PostPosted: Sun Nov 24, 2019 11:03 pm 
Offline
Regular
I finally found the time to try it out. Unfortunately I could not get it working.The 0x1D11E from your example does not seem to be a valid emoji as defined in https://unicode.org/emoji/charts/full-emoji-list.html and it renders a strange symbol I can't really make out what it is supposed to be.

Also I tried converting the UTF8 from the API to UTF16 for Java https://github.com/OneAndOnlyOdin/VMast ... groovy#L28
The line
Code:
final features = ["insecure-html"]
has to be changed to
Code:
final features = ["insecure-html", "emoji"]
so the API sends emojis.

But this too only shows empty squares for the emojis when I feed them into the getSelectedValue function and they don't show up at all if rendered as HTML in the result of a message.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.