User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 (Debian-1.5.dfsg+1.5.0.6-3) Build Identifier: When it is ja_JP.EUC-JP, Orage clock panel-plugin is garbled. Reproducible: Always
Created attachment 744 It is the patch which is ad-hoc.
Will look/test this soon.
Fxed now in svn revision 22883. It would be great if you could test and verify that it works now. I do not have environment where test this. I assume the parameters are correct and did not convert them, so the fix is different than what you suggested. I only converted the result of strftime. Also I did not modify the po file. You need to discuss that with the translators for Japan. "week" is not japanise word, so there is something wrong in your patch. Thanks for the patch, it showed where the error is!
strftime outputs EUC-JP when I set a locale in EUC-JP. When a parameter includes Japanese character string (UTF-8), it mix with Japanese character string (EUC-JP) of strftime. The reason why I deleted Japanese character string from a po file is that it do not mix.
this po string is converted to utf8, so it should work. oc_date_tooltip: ... strftime(date_s, 255, _("%A %d %B %Y/%V"), &clock->now); /* Conversion to utf8 */ if (!g_utf8_validate(date_s, -1, NULL)) { ...
>strftime(date_s, 255, _("%A %d %B %Y/%V"), &clock->now); _("%A %d %B %Y/%V") <- UTF-8 is from po file date_s <- UTF-8 & EUC-JP string (mixed here!) >if (!g_utf8_validate(date_s, -1, NULL)) { It is judged to be UTF-8 by the character string that UTF-8 and EUC-JP were mixed in here.
ok. Changed it to be strftime(date_s, 255 , g_locale_from_utf8( _("%A %d %B %Y/%V"), -1, NULL, NULL, NULL) , &clock->now); so now date_s is purely local and the test should work. Appreciate if you can test and verify it. (revision 22886.)
It worked well. Thank you.
Moving all bugs to new Orage product.