I think it's a bug of webkit(or webkit-gtk, i am not sure). Date.toLocalTimeString() return a unexpected localize string. = What steps will reproduce the problem? = == way 1 == - open a webkit-gtk based browser - paste `javascript:alert(new Date().toLocaleTimeString())` to address entry. - type enter. == way 2 == - open terminal - paste `LANG="zh_CN.UTF-8" python -c "import webkit; webkit.WebView().execute_script('alert (new Date().toLocaleTimeString())');"` - type enter = What is the expected output? What do you see instead? = - In Firefox for Linux, it return "HH时MM分SS秒" in locale "zh_CN.UTF-8" - In Google Chrome for Linux, it return "HH:MM:SS" in locale "zh_CN.UTF-8" - In Webkit-gtk base browser, it return something like "15æ¶12å12ç§" ... see attachment for detail. I think the firefox-way is better. It seems webkit-gtk wanna deal it in firefox-way, but what it dose is not good enough.
Created attachment 65531 [details] Screenshot.
This works for me with epiphany master and latest WebKitGTK+ from trunk. What version are you using?
(In reply to comment #2) > This works for me with epiphany master and latest WebKitGTK+ from trunk. What version are you using? in locale zh_CN.UTF-8 ? my webkit version: $ dpkg -s libwebkit-1.0-2 Package: libwebkit-1.0-2 Status: install ok installed Priority: optional Section: libs Installed-Size: 14828 Maintainer: Debian WebKit Maintainers <pkg-webkit-maintainers@lists.alioth.debian.org> Architecture: i386 Source: webkit Version: 1.2.3-2
workaround: {{{ decodeURIComponent(escape(new Date().toLocaleTimeString())) }}} via: http://code.google.com/p/hotot/source/detail?r=b573c8cf8ecb0c3f7ee0319ea412f59bf14df50e
I could not reproduce this issue with a fairly recent build of WebKit GTK+, do you mind trying it on a later, unstable version?