Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2090 closed defect (fixed)

bad encoding in django.po french file

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

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@…> 9 years ago.
po file converted to iso-8859-1
django.mo (31.9 KB) - added by fredz <fredz@…> 9 years ago.
corresponding mo file (msgfmt -o django.mo django.po)

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by ramiro

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 Changed 9 years ago by fredz <fredz@…>

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

Changed 9 years ago by fredz <fredz@…>

po file converted to iso-8859-1

Changed 9 years ago by fredz <fredz@…>

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

comment:3 Changed 9 years ago by ramiro

  • Component changed from Admin interface to Internationalization
  • Owner changed from adrian 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 Changed 9 years ago by hugo

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 Changed 9 years ago by hugo

  • Resolution set to fixed
  • Status changed from new to closed

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

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