Project

General

Profile

Actions

Bug #1183

closed

WTemplate::Functions::tr with Russian letters

Added by Boris Nagaev almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
03/11/2012
Due date:
% Done:

0%

Estimated time:

Description

Hello!

I tried to use WTemplate::Functions::tr with WTemplate.

It seems to produce ? instead of Russian letters.

Test attached

Best Regards


Files

t.cpp (535 Bytes) t.cpp Boris Nagaev, 03/11/2012 04:50 PM
qqq.xml (145 Bytes) qqq.xml Boris Nagaev, 03/11/2012 04:50 PM
qqq_ru.xml (110 Bytes) qqq_ru.xml Boris Nagaev, 03/11/2012 04:50 PM
Actions #1

Updated by Wim Dumon almost 13 years ago

Thank you. The one-liner patch below will be in git soon.

Wim.

---- a/src/Wt/WTemplate.C

  • b/src/Wt/WTemplate.C
    @@ --26,7 +26,7 @@ bool WTemplate::_tr(const std::vector& args,
    WString s = WString::tr(args[0].toUTF8());
    for (unsigned j = 1; j < args.size(); ++j)
    s.arg(args[j]);
  • result << s; // FIXME formatting / escaping ?
  • result << s.toUTF8(); // FIXME formatting / escaping ?
    return true;
    } else {
    LOG_ERROR("Functions::tr(): expects at least one argument");
Actions #2

Updated by Koen Deforche almost 13 years ago

  • Status changed from New to Resolved
  • Target version set to 3.2.1
Actions #3

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF