develooper Front page | perl.perl5.porters | Postings from December 2000

Re: UTF8 flag and sv_utf8_upgrade

Thread Previous | Thread Next
Tim Bunce
December 12, 2000 05:45
Re: UTF8 flag and sv_utf8_upgrade
Message ID:
On Tue, Dec 12, 2000 at 12:30:02PM +0000, Nick Ing-Simmons wrote:
> Is there any reason NOT to turn on SvUTF8 once we have established 
> that it is valid UTF8 - even if only because it has no high bit chars?
> Should perl do this or should Tk do it ?

Their might be for some cases.

I'd suggest changing the function to return a value to indicate what was
found and then adding a wrapper function, say Perl_sv_utf8_upgrade_ascii,
that uses the return value to do SvUTF8_on.

(Or adding an extra parameter to control the behaviour if you're happy
to change the prototype.)

(Or something like that.)


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