[Kde-bindings] Utf-8 bug

Han Holl han.holl at pobox.com
Thu Jan 19 14:59:38 UTC 2006


On Thursday 19 January 2006 15:57, Richard Dale wrote:

> No it's correct! The value of $KCODE affects how ruby strings are converted
> to and from QStrings. QStrings are always unicode, so you can guarantee
> that Qt code will run on any filesystem, as long as you only use calls in
> the Qt api to access it. If you don't set $KCODE to 'u', all strings are
> assumed to be latin1, which is going to be locale specific and not always
> portable.
>
Ok, it's not a bug, it's a problem that cannot be solved. As long as a 
filesystem doesn't have a encoding property, one cannot know the encoding of 
filenames.
Maybe latin1 isn't the best default, especially with LANG="en_US.UTF-8" in the 
environment of the process.
And I don't know  if borrowing $KCODE for this purpose is reasonable. It has a 
couple of documented effects in the Regex class with little relation to 
qtruby.
Maybe an explicit iconv based encoding scheme could be used ?

And I do absolutely not understand why it worked sometimes .

Cheers,

Han Holl





More information about the Kde-bindings mailing list