Mark Dootson <mark.doot...@znix.com> writes:

> On 30/04/2013 19:19, Johan Vromans wrote:
>
>> We may assume that the Perl string is in Perl's internal encoding.
>
> No we may not.

In that case you'll run into all kinds of encoding problems anyway.

See e.g. perlunitut.

> I kind of like the existing solution which doesn't break existing code
> all over the place and simply requires the coder to be specific about
> the format of the data they are sending.

My main concern is: If I have correctly decoded string data, will it
work when passed to wxWdigets. For example:

  $orig = readline($datafile);
  $line = decode( 'utf8', $orig );
  $w = Wx::StaticText->new( ... );
  $w->SetLabel($line);

If an explicit utf8::upgrade were required in this case, my feelings
tell me something is wrong.

-- Johan

Reply via email to