RESOLVED WONTFIX Bug 48463
String::format() on Qt port doesn't work with utf-8
https://bugs.webkit.org/show_bug.cgi?id=48463
Summary String::format() on Qt port doesn't work with utf-8
Ademar Reis
Reported 2010-10-27 13:59:21 PDT
String::format() on the Qt port doesn't work with utf-8 strings because it calls QString::vsprintf(), which handles cformat as a Latin1 string by default[1] (unless changed by QTextCodec::setCodecForCStrings(), which is global and non-thread-safe). Because of that we can't, for example, reuse the current strings in the WebKit2 LocalizationStrategy[2], not to mention potential bugs somewhere else due to this unexpected limitation. See also bug 18994 for a long discussion on String::format() pitfalls and bug 37327 that lists several places where String::format() is used with utf-8 strings. 1. http://doc.trolltech.com/4.7/qtextcodec.html#setCodecForCStrings 2. WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Attachments
Ademar Reis
Comment 1 2010-10-27 14:23:09 PDT
I've just noticed that the plan is to eliminate String::format() completely. See bug 30342 :-)
Note You need to log in before you can comment on or make changes to this bug.