Hi Mark and John,

As it is at the moment, I just use decode and I don't get any errors.

But I do need to use decode.

I get a lot of problems all over the place if I don't.

Regards

Steve

-----Original Message-----
From: Johan Vromans [mailto:jvrom...@squirrel.nl] 
Sent: 29 April 2013 12:02
To: wxperl-users@perl.org
Subject: Re: Can we print UTF-8 chars in Wx::TextCtrl fields?

<steveco.1...@gmail.com> writes:

> So you are saying that if I change
>
>       $var = decode("utf8",$row->{ATT_BOOKING_COMMENT_TXT}) ;
>
> to 
>
>       $var = decode("utf8",$row->{ATT_BOOKING_COMMENT_TXT}) ;
>       utf8::upgrade($var );
>
> it will be more resilient and cater for more cases than just the decode
> option.

utf8::upgrade should have no effect after the decode. If it is
necessary for some reason, there's a bug or coding error.

Do you have an sample case that malfunctions without the upgrade call?

(In general, the utf8:: functions should never be necessary.)

-- Johan

Reply via email to