Mailinglist Archive: yast-devel (54 mails)

< Previous Next >
[yast-devel] Detecting and removing invalid UTF-8 characters

Hi all,

this is JFYI, some time ago I fixed a bug where Yast received an invalid UTF-8
sequence in a string from outside (bnc#876459).

You can read and write such a string without problems, but if you want to
it by some Ruby methods it will likely throw an exception.

For detecting invalid encoding use String#valid_encoding?, for removing
String#encode! (see for

So if you need to handle such situation in your code then you should know where


Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages