On Wed, Jun 17, 2009 at 6:34 PM, Ville M. Vainio<[email protected]> wrote:
> I disagree about this - in fact I think we should never "convert" to > unicode. We use unicode() to get python unicode objects from QStrings > (i.e. no conversion happens). Calling a function that *possibly* does > conversion is a recipe for trouble because it hides errors (as > happened today). Actually, what happened today (and what was "fixed" by doing utf8 conversion) was not really a fix at all. We just did a workaround that incidentally works, but the bug revealed a logical fallacy in the codebase (confusion of binary vs. unicode). I think we should fail as loudly as possibly whenever something like this happens, instead of sweeping the problem under the rug by "catch-all" functions like g.toUnicode. The only canonical place to deal with non-unicode data is when reading/writing binary files - or, as with this bug, when reading/writing binary data to clipboard. The amount of conversions should be few and far apart. -- Ville M. Vainio http://tinyurl.com/vainio --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
