http://bugs.winehq.org/show_bug.cgi?id=29038
Bug #: 29038 Summary: strftime in gvim is outputting strings in a wrong encoding Product: Wine Version: 1.3.30 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: kp-pav@yandex.ru Classification: Unclassified
strftime('%c') in gvim under wine is outputting «РЎСЂРґ 09 РќРѕСЏ 2011 16:19:26», while it should «Срд 09 Ноя 2011 16:19:26» (can be obtained from the first by using `iconv -f UTF-8 -t CP1251 | iconv -f UTF-8'). strftime in just the same gvim executable in a virtual machine works fine (except that it has different output with `%c', so to check encoding I had to use `%b' token).
http://bugs.winehq.org/show_bug.cgi?id=29038
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |msvcrt Ever Confirmed|0 |1
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2011-11-09 21:58:42 CST --- Confirming. strftime() in msvcrt is just a forward to libc while it probably should be implemented using win32 API GetDateFormat().
http://bugs.winehq.org/show_bug.cgi?id=29038
--- Comment #2 from ZyX kp-pav@yandex.ru 2011-11-10 07:46:50 CST --- (In reply to comment #1)
Confirming. strftime() in msvcrt is just a forward to libc while it probably should be implemented using win32 API GetDateFormat().
It can be a forward to anything, but libc outputs in encoding specified in $LC_TIME, and wine should decode it to expected encoding.
Thanks for the pointer though: if I add `local -x LC_TIME=ru_RU.CP1251' to function that calls vim, tests are passing normally.
http://bugs.winehq.org/show_bug.cgi?id=29038
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2011-11-10 23:04:48 CST --- Created attachment 37439 --> http://bugs.winehq.org/attachment.cgi?id=37439 Forward strftime to wcsftime
Does the attached patch help?
http://bugs.winehq.org/show_bug.cgi?id=29038
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #4 from Piotr Caban piotr.caban@gmail.com 2012-04-16 10:48:05 CDT --- It should be working now. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=29038
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |ef08e807651bcb7687e1a68660f | |c83e3931dc30e Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #5 from Piotr Caban piotr.caban@gmail.com 2012-08-18 02:30:56 CDT --- Works for me. Marking as fixed.
http://bugs.winehq.org/show_bug.cgi?id=29038
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2012-08-31 12:56:50 CDT --- Closing bugs fixed in 1.5.12.