[vdr] Converting from UTF-8 to ISO-8859-1
joachim.wilke at gmail.com
Sun May 18 18:53:48 CEST 2008
2008/5/18 Klaus Schmidinger <Klaus.Schmidinger at cadsoft.de>:
> On 05/18/08 18:27, Joachim Wilke wrote:
>> Is there a reason for this?
> systemCharacterTable is only set if it is a single byte character set,
> which UTF-8 is not.
>> The conversion works fine, if I use "UTF-8" instead of "NULL":
>> cCharSetConv conv("UTF-8", "ISO-8859-1");
> Good, so it works as designed ;-)
so what do I have to do, to convert a string (from whatever encoding
VDR currently uses) to ISO-8859-1 ?
Do I really have to do:
if(cCharSetConv::SystemCharacterTable == NULL)
cCharSetConv conv("UTF-8", "ISO-8859-1");
cCharSetConv conv(NULL, "ISO-8859-1");
const char *s_converted = conv.Convert(string);
This is against the generic use of "NULL" as parameter, in my opinion.
More information about the vdr