develooper Front page | perl.perl5.porters | Postings from August 2009

RE: Full Unicode semantics at every level

Jan Dubois
August 26, 2009 18:12
RE: Full Unicode semantics at every level
Message ID:
On Wed, 26 Aug 2009, demerphq wrote:
> 2009/8/27 Jan Dubois <>:
> > Getting to "full Unicode semantics at every level" sounds like a huge
> > undertaking. Unless we get rid of the SvUTF8 flag and indiscriminately
> > store all strings internally as UTF8, we would have to modify
> > virtually *all* APIs that currently take char* arguments and replace
> > them with SV*s, including all the OS level wrappings, like access
> > to the environment and file system.
> Is that not a good thing? Forget the amount of work for a moment. What
> is the right design decision?

Yes, I think moving all char* APIs to SV* APIs is the right thing to
do.  Unfortunately it will also break source level compatibility for XS
code. But maybe it will be possible to implement some compatibility
layer for the old interface that will continue to work as long as all
data is just latin1 encoded.  Something like:

#define fopen(file, mode) fopen_sv(sv_2mortal(newSVpv(file)), sv_2mortal(newSVpv(mode))

-Jan Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About