Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2242 closed defect (wontfix)

DateFormat: weekday and month names in UTF-8 are abbreviated incorrectly

Reported by: Andrey Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: normal Keywords:
Cc: aela@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently the abbreviation is done like this: WEEKDAYS[self.data.weekday()][0:3]. This does not work in case of UTF-8 or other multibyte encoding.

Change History (2)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: wontfix
Status: newclosed

Isn't the "D" format string coupled to English by its very nature? I'm fine with this staying the way it is, unless somebody has a really good reason otherwise.

comment:2 by Andrey, 18 years ago

Cc: aela@… added

Let me explain in more detail. When I am using "D" format and current weekday is "Среда" ("Wednesday" in Russian), I am expecting to get something like "Срд" (which is what strftime returns for "%a" format), or at least "Сре" (which is simple truncation to three characters). But all I get is some garbage like "С�", because UTF-8 string is just truncated to 3 bytes.

Well, ASCII-speaking users may be quite happy with it, but not me and other users of UTF-8. :) Anyway, this misfeature should at least be documented to avoid further bug reports.

Note: See TracTickets for help on using tickets.
Back to Top