Mark Dootson <mark.doot...@znix.com> writes: I'm just trying very hard to understand...
> So, when we are passing the content of a Perl SV we can check the utf8 > flag and depending on that we can tell the wxWidgets library either > > 1. This data is UTF-8 Which I understand is safe, it will always work. > 2. This data is the current default format fro wxWidgets. Which I understand it may work if you're lucky. > I am of the opinion that this bit ( WXSTRING_INPUT ) already works as > well as it can do if given an SV and no other params. I certainly > would not want to change it to force all input to be valid UTF-8. > There is absolutely no reason to do so. Forcing valid UTF-8 will enhance both cases to "will allways work". This sounds like a good reason to me. > [ ... on upgrade ... ] > I don't think there's a coding error just because I use > utf8::upgrade($string). I don't need utf8::upgrade for my Perl code. I > need it to allow me to tell wxWidgets what's in $string. I understand this to mean: always do a utf::upgrade *before* passing a string to wxWidgets. For me this is a signal that upgrading should take place on the Perl <-> wxWidgets boundary and not in the user program. > I appreciate your view may be different and you're entitled to think > mine is wrong. My knowledge of the hairy details of Perl and Unicode is not sufficient to tell what/who is wrong or right. Hence my urge to understand. -- Johan