Bug 29386

Summary: [Qt] QtWebKit: Date::toLocaleDateString() is not encoded correctly
Product: WebKit Reporter: Tor Arne Vestbø <vestbo>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Minor CC: ademar, aparna.nand, benjamin, cmarcelo, jturcotte, kent.hansen
Priority: P3 Keywords: EasyFix, Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   

Description Tor Arne Vestbø 2009-09-18 07:10:14 PDT
This bug report originated from issue QTBUG-2682
<http://bugreports.qt.nokia.com/browse/QTBUG-2682>

--- Description ---

Consider the following HTML page, displayed with QtWebKit and using ja_JP.UTF-8 locale:

<html>
<head>
</head>
<body>
<script language="javascript">
alert('a');
var localeDate = new Date();
alert(localeDate.toLocaleDateString());
document.writeln(localeDate.toLocaleDateString());
</script>
</body>
</html>


The expected result is "2008年08月27日".

The actual result is "2008¥ᄍᄡ08₩ワネ27₩ラ".
Comment 1 Kent Hansen 2010-03-16 04:16:19 PDT
Qt shares the toLocaleDateString() implementation with other platforms, the only one currently with a custom implementation is Mac.
Comment 2 Tor Arne Vestbø 2010-03-17 06:09:40 PDT
Confirmed in trunk. This works fine in Qt's calendar widget example, so we should probably go though Qt there to get the right behavior for the platform.
Comment 3 Aparna Nandyal 2011-02-13 22:36:07 PST
It seems to be working fine. Confirmed it on code in trunk on Ubuntu system. The result is 2011年02月14日.
Comment 4 Ademar Reis 2011-02-18 09:56:37 PST
Tested on the following versions:

trunk: not affected
2.1 (branch): not affected
2.0 (qt47): affected

(Linux Fedora 13, Qt-4.7)

Since trunk is fine, I'm closing the bug. The next version of QtWebKit (2.1) will also be fine. Thanks for reporting it.