Re: Wide character support enabling

Leon Bottou <[email protected]> Fri, 17 Feb 2006 12:09:46 -0500
Newsgroups gmane.lisp.lush.devel
Message-ID <[email protected]>
On Friday 17 February 2006 09:59 am, Raymond Martin wrote:
> Hi,
> I'd like to compile Lush with wide character support so that unicode can be used 
> in conjunction with locales, but I don't see where to do this. 'configure' makes no 
> mention of an option for this. Where to start?

You'd have to rewrite the string functions to work properly.
Most are in src/string.c, and some compiled versions in lsh/compiler/dh-macros.lsh.
I already made a few changes to properly display multibyte characters in strings.
Search for 'HAVE_WCHAR_T' in the file src/string.c.

But then I encountered backward compatibility problems 
because some programs use strings as containers for arrays of bytes.
I had to backtrack (see str_chr and str_asc) 

See also functions {explode,implode}-{bytes,char}

- L.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642