Re: [spr29414] Help getting CLIM to display Greek characters
"Charles A. Cox" <[email protected]> Fri, 1 Oct 2004 15:25:45 -0700
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
Thanks for your question. I am not a CLIM expert so I may not be able to answer completely the main problem, but I can describe a bit of what Allegro CL and CLIM are doing, and that might be able to help narrow the problem's focus. > Overriding this effect with the locale el_GR.utf8 does not work: > the system stops working (comparison of strings fails, and it > returns no results). We did not try with el_GR.latin7, since the > input files are in UTF-8. We might need some more information to understand this problem. However, keep in mind that the external-formats' purpose is to convert external character sets, such as utf-8 and latin7, to/from 16-bit Unicode. Inside Lisp, 16-bit Unicode only is used, so string comparisons in Lisp, etc. should be independent of the external-format. > Annoying (and not just unexpected) is that the (UTF-8) output > that is shown in the CLIM window is interpreted as iso-8859-1, > which makes it unreadable. I suspect there is some setting > missing that tells CLIM to interpret the strings as UTF-8. The > question is: if that is so, what is it? The issue here seems to be the encoding expected by the font. My understanding of X11 is that the fonts use iso8859 or jis encodings and not Unicode or utf-8. So, to display Greek characters, you would need to use an iso8859-7 font and arrange to have the characters from Lisp transmitted using the iso8859-7 (latin7) external-format. This should be the default external-format with the el_GR locale. When you say your input files are in utf-8, I'm not clear if your files are read in by using the lisp loader (e.g., Lisp source files) or by simply opening the files and reading them in using read/read-sequence/read-char/etc. In either case, you can specify the external-format of the input stream using (open ... :external-format :utf-8) or (load ... :external-format :utf-8) and then the utf-8 to 16-bit Unicode conversions happen automatically on input. Please let us know if you have further questions. Charley --- Charles A. Cox, Franz Inc. 555 12th Street, Suite 1450 Internet: [email protected] Oakland, CA 94607 WWW: http://www.franz.com/ Phone: (510) 452-2000; FAX: (510) 452-0182