Re: ib - r30836 - abiword/trunk/src/wp/ap/xp

From: Simon Larochelle <larochelle.simon.1_at_gmail.com>
Date: Sun Apr 22 2012 - 00:00:35 CEST

Since our code uses UTF8, UCS4 and even UCS2 encoding, are we assuming
that all std::string are UTF8 encoded?

Simon

2012/4/21 Hubert Figuière <hfiguiere@teaser.fr>:
>
> On 12-04-21 9:14 AM, cvs@abisource.com wrote:
>
>> Modified: abiword/trunk/src/wp/ap/xp/ap_Dialog_RDFEditor.cpp
>> ===================================================================
>> --- abiword/trunk/src/wp/ap/xp/ap_Dialog_RDFEditor.cpp  2012-04-21
>> 14:55:26 UTC (rev 30835)
>> +++ abiword/trunk/src/wp/ap/xp/ap_Dialog_RDFEditor.cpp  2012-04-21
>> 16:14:07 UTC (rev 30836)
>> @@ -102,7 +102,10 @@
>>  AP_Dialog_RDFEditor::statusIsTripleCount()
>>  {
>>      stringstream ss;
>> -    ss<<  "Total RDF:"<<  m_count;
>> +    const XAP_StringSet *pSS = m_pApp->getStringSet();
>> +    UT_UTF8String str;
>> +    pSS->getValueUTF8(AP_STRING_ID_DLG_RDF_Editor_Status, str);
>> +    ss<<  str.utf8_str()<<  m_count;
>>      setStatus(ss.str());
>>  }
>
>
>
> There is a version of getValueUTF8() that take std::string, and this is what
> should be used.
> No new code shall use UT_UTF8String, with a few exceptions. This is not one
> of them.
>
> Also I (silently) frowned upon the use on stringstream in the RDF code and
> would rather prefer a format as formats more localizable.
>
>
> Hub
Received on Sun Apr 22 00:00:46 2012

This archive was generated by hypermail 2.1.8 : Sun Apr 22 2012 - 00:00:46 CEST