Project

General

Profile

Actions

Support #4403

closed

Russian text

Added by ioann sys over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
08/19/2015
Due date:
% Done:

0%

Estimated time:

Description

Hello!

How I can write to webpage russians symbols?

i try

WContaierWidget *interface = new WContainerWidget(this->root());

...

interface->addWidget(new WText("Русский тескт <--- Russian text"));

and i see result:

?? <--- Russian text. How fix it?

Actions #1

Updated by Wim Dumon about 9 years ago

  • Status changed from New to Resolved

The only portable way is to put the text in a message resource bundle outside of the .C file.

Non-portable alternatives:

interface->addWidget(new WText(WString::fromUTF8("Русский тескт <-- Russian text")));
interface->addWidget(new WText(L"Русский тескт <-- Russian text"));
Actions #2

Updated by ioann sys about 9 years ago

Thank you! It work for me.

I write simple function for printing text:

void print_str(WContainerWidget *widget, string text, int h = 0)

{

WText *txt_widget = new WText( WString("<h{1}>").arg(h) + WString::fromUTF8(text) + WString("</h{1}>").arg(h), widget);

return;

}

Actions #3

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions #4

Updated by Koen Deforche about 9 years ago

  • Target version set to 3.3.5
Actions

Also available in: Atom PDF