Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2090 closed defect (fixed)

bad encoding in django.po french file

Reported by: fredz@… Owned by: hugo
Component: Internationalization Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django/conf/locale/fr/LC_MESSAGES/django.po
line 15 :
should have "Content-Type: text/plain; charset=UTF-8\n"
instead of "Content-Type: text/plain; charset=ISO-8859-1\n"

the django.mo file should be rebuild

Attachments (2)

django.po (53.1 KB ) - added by fredz <fredz@…> 19 years ago.
po file converted to iso-8859-1
django.mo (31.9 KB ) - added by fredz <fredz@…> 19 years ago.
corresponding mo file (msgfmt -o django.mo django.po)

Download all attachments as: .zip

Change History (7)

comment:1 by Ramiro Morales, 19 years ago

Hi fredz,

What's the reason of this suggestion?. I ask because I maintain the Agentinean spanish transalation and so far they are coded and tagged as ISO-8859-1 (inherited from the generic Spanish transalation). Is there anything in the Django documentation that suggest/mandates this?.

I'm no opposing the idea, I just want to know so I can change es_AR message catalogs to UTF-8 too if necessary.

A quick overview of the charset headers of some European language django.po files now (SVN revision 3083):

langcharset
csutf-8
cyutf-8
dautf-8
deiso-8859-1
esiso-8859-1
friso-8859-1
itutf-8
nlutf-8
plutf-8

comment:2 by fredz <fredz@…>, 19 years ago

In fact, the file fr/LC_MESSAGES/django.po is utf-8 encoded but has a iso-latin header !
You are right, it would be better to translate django.po in iso-latin.
I can do it if you want, but I have no access

by fredz <fredz@…>, 19 years ago

Attachment: django.po added

po file converted to iso-8859-1

by fredz <fredz@…>, 19 years ago

Attachment: django.mo added

corresponding mo file (msgfmt -o django.mo django.po)

comment:3 by Ramiro Morales, 19 years ago

Component: Admin interfaceInternationalization
Owner: changed from Adrian Holovaty to hugo

Fredz,

It seems Django (or more correctly the gettext tools) doesn't enforce any charset. From http://www.djangoproject.com/documentation/i18n/#message-files:

-x8-
Mind your charset

When creating a .po file with your favorite text editor, first edit the charset line (search for "CHARSET") and set it to the charset you'll be using to edit the content. Generally, utf-8 should work for most languages, but gettext should handle any charset you throw at it.
-8x-

So it IMHO this ticket can be closed. If you read this and agree please do so.

Regards,

comment:4 by hugo, 19 years ago

in the spirit of "do the least possible damage by doing the least possible work" ;-) - I just changed the charset denotation in the file to utf-8, as the file itself is utf-8.

comment:5 by hugo, 19 years ago

Resolution: fixed
Status: newclosed

(In [3090]) fixed #2090: fixed bad charset header in po file

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