On Thu, 10 Nov 2005 21:45:23 -0800 (PST), rajarshi das <[EMAIL PROTECTED]> wrote
>> method 2)
>>
>> $value =~ s/%([a-fA-F0-9]{2})/pack('U', hex($1))/ge;
> Thanks for suggesting this. This looks like a good alternative.
>
>> Note. The "UTF8 flag" of $value will be turned on.
>
> Does turning on the 'UTF8-flag' in $value give rise to any issues ?
Generally no problem, I believe.
In many cases Perl 5.8.x properly treats a string value with UTF8-flag
turned on and a string value with UTF8-flag turned off.
But your original script is for perl 5.005_03, in which the UTF8-flag
is not implemented. Such an old script might contain some operation
or function whose behavior has been changed between perl 5.005_03
and perl 5.8.7. Possibly something which were not distinguished
each other might be distinguished now unexpectedly.
If something is found problematic, you can use
utf8::downgrade($value) to turn the UTF8 flag off safely.
Regards,
SADAHIRO Tomoyuki