! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Orage clock panel-plugin is garbled.
Status:
CLOSED: FIXED

Comments

Description SHITAMORI Akira 2006-08-23 13:37:54 CEST
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
Comment 1 SHITAMORI Akira 2006-08-23 13:40:47 CEST
Created attachment 744 
It is the patch which is ad-hoc.
Comment 2 juha editbugs 2006-08-25 14:50:40 CEST
Will look/test this soon.
Comment 3 juha editbugs 2006-08-26 12:20:52 CEST
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!
Comment 4 SHITAMORI Akira 2006-08-26 13:05:13 CEST
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.
Comment 5 juha editbugs 2006-08-26 13:33:57 CEST
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)) {
...
Comment 6 SHITAMORI Akira 2006-08-26 14:29:48 CEST
>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.
Comment 7 juha editbugs 2006-08-26 15:48:44 CEST
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.)
Comment 8 SHITAMORI Akira 2006-08-26 17:29:34 CEST
It worked well. Thank you.
Comment 9 Brian J. Tarricone (not reading bugmail) 2007-01-26 18:58:44 CET
Moving all bugs to new Orage product.

Bug #2208

Reported by:
SHITAMORI Akira
Reported on: 2006-08-23
Last modified on: 2007-01-26

People

CC List:
0 users

Version

Version:
unspecified

Attachments

It is the patch which is ad-hoc. (1.23 KB, patch)
2006-08-23 13:40 CEST , SHITAMORI Akira
no flags

Additional information