Modify

Opened 6 years ago

Last modified 4 months ago

#4614 new defect

Some nls trouble.

Reported by: anonymous Owned by: osimons
Priority: normal Component: FullBlogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Incorrect encoding of output symbols for months if trac started with specific locale for LC_TIME. In my case it's ru_RU.
See attached screenshot...

Attachments (1)

Untitled-1.png (34.9 KB) - added by anonymous 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by anonymous

comment:1 Changed 6 years ago by osimons

What does the [trac] default_charset = setting say on your setup? I think it gets a different encoding from the Python calendar stdlib than what you use elsewhere in you Trac setup.

As a workaround, there is a setting for defining month names if you don't want your locale default (i use no_NB locale, but want an English blog):

[fullblog]
month_names = January, February, March, April, May, June, July, August, September, October, November, December

Should perhaps also work if you type your ru_RU names in the settings as that file is UTF-8 encoded?

comment:2 Changed 6 years ago by anonymous

  1. [trac] default_charset = set to utf-8.
  2. if I set [fullblog] month_names = to list of months in ru_RU then all fine. Thanks.

comment:3 follow-up: Changed 5 years ago by osimons

In [6794], a minor change was made for the display of month names. I'd be very interested to see if this also fixes you encoding issue. Could you possibly comment out your month_names setting and try your default again? Anyone still seeing encoding issues?

comment:4 in reply to: ↑ 3 Changed 4 months ago by anonymous

Replying to osimons:

In [6794], a minor change was made for the display of month names. I'd be very interested to see if this also fixes you encoding issue. Could you possibly comment out your month_names setting and try your default again? Anyone still seeing encoding issues?

I use latest FullBlogPlugin from svn. In env configuration [trac] default_charset set to utf-8 [fullblog] month_names not set, but i have similar bug with month names in blog side bar.
If edit in tracfullblog\util.py def map_month_names(month_list):`

...
return [to_unicode(calendar.month_name[i+1], charset="cp1251") for i in range(12)]
...

then month names OK.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.