Project

General

Profile

Actions

Support #4403

closed
IS

Russian text

Support #4403: Russian text

Added by ioann sys about 11 years ago. Updated almost 11 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?

WD Updated by Wim Dumon about 11 years ago Actions #1

  • 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"));

IS Updated by ioann sys about 11 years ago Actions #2

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;
}

KD Updated by Koen Deforche almost 11 years ago Actions #3

  • Status changed from Resolved to Closed

KD Updated by Koen Deforche almost 11 years ago Actions #4

  • Target version set to 3.3.5
Actions

Also available in: PDF Atom