I've applied this patch.

I realize that we have a ways to go before we can fully support unicode, but
I felt that this patch was a big step in the right direction; with it
committed we can now start incrementally cleaning it up and making it work
correctly.  Since it doesn't affect anything we are working on it shouldn't
get in the way at all.

I didn't check in the test program as I didn't know where to put it :)

We do need to figure out how to change from unicode to native.  We also need
to make sure that we don't hardcode the encoding in the assembler, the
assembler should be able to get what encoding to use from a file.

Thanks!
Tanton

-----Original Message-----
From: Tom Hughes
To: [EMAIL PROTECTED]
Sent: 10/7/2001 10:23 AM
Subject: Transcoding patch

The attached patch is a first stab at implementing string transcoding
and the unicode string types.

The transcoder will currently only map one UTF type to another - there
is no attempt to implement mapping to or from native strings as I wasn't
sure what the plan was for that. Presumably we will have to determine
what the native character set is at configure time and then generate
some code to map between that and unicode somehow?

There are currently no proper tests because there is no way to generate
anything other than a native string using the current assembler. There
is
a small C test harness (trans-test.c) which I have used to validate the
transcoder to a certain extent.

This patch also fixes a bug in the existing native strings where
string_native_compute_strlen was returning the number of bytes that
had been allocated rather than the number that were in use.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
 <<transcode.patch>> 

Reply via email to