Project

General

Profile

binding UTF8 strings

Added by Stefan Arndt almost 9 years ago

Hi there,

Today I resumed working on my project and after upgrading to wt 3.3.4 I have some encoding problems in Wt::WTemplate.

These do not work properly anymore:

bindString( "title", "äöüß@[]{}¹²³¢¥" );
bindString( "title", Wt::WString( "äöüß@[]{}¹²³¢¥", Wt::UTF8 ) );
bindString( "title", Wt::WString::fromUTF8( "äöüß@[]{}¹²³¢¥" ) );
bindString( "title", Wt::WString::tr( "some-key" ) );

Instead I get this message and a lot of "?" in my output: "WString: narrow(): loss of detail: @[]{}?"

Using a WText or specifying a string in a xml-template with {tr:key} works fine (but should not be required).

bindWidget( "title", new Wt::WText( "äöüß@[]{}¹²³¢¥" ) );

Do I miss something on my end or might this be related to #3942?


Replies (1)

RE: binding UTF8 strings - Added by Stefan Arndt almost 9 years ago

The issue seems to be fixed for 3.3.5, at least I do not see any problems if I build wt from the current master revision.

(More info here: #4155)

    (1-1/1)