Django

Code

Ticket #2090 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

bad encoding in django.po french file

Reported by: fredz@pimentech.net Assigned to: hugo
Milestone: Component: Internationalization
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

django.po (53.1 kB) - added by fredz <fredz@pimentech.net> on 06/05/06 11:35:02.
po file converted to iso-8859-1
django.mo (31.9 kB) - added by fredz <fredz@pimentech.net> on 06/05/06 11:36:17.
corresponding mo file (msgfmt -o django.mo django.po)

Change History

06/05/06 11:02:18 changed 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

06/05/06 11:14:06 changed by fredz <fredz@pimentech.net>

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

06/05/06 11:35:02 changed by fredz <fredz@pimentech.net>

  • attachment django.po added.

po file converted to iso-8859-1

06/05/06 11:36:17 changed by fredz <fredz@pimentech.net>

  • attachment django.mo added.

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

06/06/06 09:46:38 changed by ramiro

  • owner changed from adrian to hugo.
  • component changed from Admin interface to Internationalization.

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,

06/06/06 10:12:53 changed 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.

06/06/06 10:13:19 changed by hugo

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #2090 (bad encoding in django.po french file)




Change Properties
Action