Utf in guiserver?

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Utf in guiserver?

Post 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?

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

At the moment only gs:load-text from a file will work for UTF-8, gs:set-text will not work.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Cool, thanks!

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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.

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post 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"))

Locked