develooper Front page | perl.perl6.internals | Postings from October 2001

Transcoding patch

Thread Next
From:
Tom Hughes
Date:
October 7, 2001 08:23
Subject:
Transcoding patch
Message ID:
cb7ac6c54a.tom@compton.compton.nu
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 (tom@compton.nu)
http://www.compton.nu/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About