trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2016

Re: Re: Re: TQString::fromUtf8 vs TQString::fromLatin1 [possible bug in parseVCard]

From: deloptes <deloptes@...>
Date: Mon, 28 Mar 2016 00:09:48 +0200
Fat-Zer wrote:

> diff --git a/tdeabc/vcardparser/vcardparser.cpp
> b/tdeabc/vcardparser/vcardparser.cpp
> index 7ac07ce..db33263 100644
> --- a/tdeabc/vcardparser/vcardparser.cpp
> +++ b/tdeabc/vcardparser/vcardparser.cpp
> @@ -152,7 +152,7 @@ VCard::List VCardParser::parseVCards( const TQString&
> text ) KCodecs::quotedPrintableDecode( input, output );
> }
> } else {
> -          output = TQCString(value.latin1());
> +          output = TQCString(value.utf8());
> }
> 
> if ( params.findIndex( "charset" ) != -1 ) { // have to
> convert the data
> 
> Note that VCardParser::parseVCards() is generally encoding-unsafe...

BTW did you raise a bug to fix this?

regards