greptilian logo

IRC log for #sourcefu, 2015-10-13

http://sourcefu.com

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
08:44 aditsu joined #sourcefu
16:26 pdurbin semiosis: unicode and javafx question: http://irclog.greptilian.com/friendlyjava/2015-10-13#i_141649
16:29 aditsu thanks :)
16:30 semiosis sounds like you need to select a font that supports those characters, as you point out in your question
16:30 semiosis otherwise idk anything about unicode :(
16:30 semiosis what font does the console or alert dialog use?
16:32 aditsu the problem is not about the font (except the 2nd character)
16:32 aditsu (maybe)
16:33 aditsu especially the input dialog completely messes up the string
16:33 semiosis this seems relevant... http://www.guigarage.com/2015/01/support-emojis/
16:34 semiosis and agrees that it *is* a font issue
16:34 semiosis or i completely misunderstand the problem, which is very likely too
16:35 aditsu the font should only affect how the string gets displayed, not the number and value of the characters
16:35 semiosis unicode characters span multiple bytes (i do know that) so if a font doesnt know how to assemble the multiples into a single char, you get more chars than you should
16:36 aditsu that's wrong, the font has nothing to do with the string encoding
16:37 semiosis ok then i'm no help, sorry
16:37 aditsu besides, the (non-JavaFX) JOptionPane message dialog handles the characters just fine
16:38 aditsu it shows them all correctly, except the 2nd one for which it shows a placeholder glyph
16:42 aditsu anyway, let me try the hacks from that link and see what happens...
16:43 aditsu hmmmm "On Mac OS there is a bug in the os depended clipboard code. Therefore you can’t paste any text with emojis in a JavaFX textfield. I will describe this problem in detail later."
16:44 aditsu I wonder if there's a similar problem in Linux
16:47 aditsu if I set the default text in the input dialog, something very weird happens
16:48 aditsu it looks just like the alert, but when I use arrow keys, it moves over 2 characters at a time for some of them
16:49 aditsu one right arrow -> it moves past the ace and the square (which should have been a kanji character)
16:50 aditsu another right arrow -> it moves past the "eye" and the emoji
16:53 aditsu let me try a newer jdk...
16:59 aditsu btw, about fonts, java doesn't forcibly try to use a fixed font for all the characters, but automatically falls back to different fonts that are able to render them
16:59 aditsu not sure why that didn't work for the 2nd one...
17:00 aditsu also, not sure if that logic is implemented directly in java or some other library or OS component
17:01 aditsu interestingly, if I copy that string and paste it into kwrite, the 2nd character looks fine but the 3rd one becomes a box
17:08 aditsu newer jdk didn't help :/
17:19 aditsu semiosis: I set the label's font to Symbola, and I can see it changed the font, but it doesn't look any better; it has 3 question marks at the end

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

http://sourcefu.com