Page 1 of 1

Utf in guiserver?

Posted: Wed May 14, 2008 4:30 pm
by cormullion
I've been unable to get utf (unicode) text displayed in a text pane... Is there a trick to getting it working, or does newLISP-GS not do Utf8?

Posted: Wed May 14, 2008 5:35 pm
by Lutz
At the moment only gs:load-text from a file will work for UTF-8, gs:set-text will not work.

Posted: Wed May 14, 2008 5:57 pm
by Lutz
... but typing it in will also work.

I have put this on my list of things to fix in newLISP-GS. gs:set-text should work too.

Posted: Wed May 14, 2008 6:52 pm
by cormullion
Cool, thanks!

Posted: Wed May 14, 2008 7:53 pm
by Lutz
There is a new guiserver.jar and a program to test it: gs-utf8test.lsp, in the http://newlisp.org/download/development/ directory.

There are a few other places than ps:text-pane, where gs:set-text could set UTF8 text, which are not checked yet.

Posted: Wed May 14, 2008 9:24 pm
by cormullion
Wow, that's great, Lutz, thanks! A quick test suggests that works just fine. I hit on a seam of Latin music in my iTunes library and thereby noticed the lack of UTF:

Code: Select all

((track-name "Céu Distante") (artist "Bebel Gilberto")   
 (duration "177.82600402832") 
 (year "2004") 
 (genre "Latin"))
((track-name "Samba Do Aviao") (artist "Miúcha & Antônio Carlos Jobim") 
 (duration "173.973007202148") 
 (year "1998") 
 (genre "Latin"))
((track-name "Essa Moça Ta Diferente") (artist "Faria, Flavio")  
 (duration "206.733001708984") 
 (year "1998") 
 (genre "Latin"))
((track-name "Cançao So Sal") (artist "Milton Nascimento")  
 (duration "196.666000366211") 
 (year "1998") 
 (genre "Latin"))
((track-name "O Ronco Da Cuica") (artist "João Bosco")  
 (duration "243.973007202148") 
 (year "1998") 
 (genre "Latin"))
((track-name "Bate Bate") (artist "José Barrense-Dias")  
 (duration "161.440002441406") 
 (year "1998") 
 (genre "Latin"))