Re: Wide character support enabling
Raymond Martin <[email protected]> Fri, 17 Feb 2006 20:09:05 +0000
| Newsgroups | gmane.lisp.lush.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On Friday 17 February 2006 17:09, Leon Bottou wrote:
> 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}
>
Okay, thanks for that.
I did some more checking and I realize now that the support is compiled in.
Whether it is working or not, I am not sure (the locale setting, character encoding,
and font also figure in).
I have read that more recent implementations of wchar_t can easily map to unicode
and that the regular C string functions work with multi-byte characters now. Will
have to do some more experimenting on this.
Cheers.
Raymond
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
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