libintl-perl

Home -> libintl-perl -> 2005 -> August

 Problem with non-ASCII message id's 
Login Login Subscribe Subscribe  Date  08/16/05 09:09:12 GMT
 From  JörnReder
 Subject  Problem with non-ASCII message id's
 Previous Thread
 Next Thread
 Start of Thread
 Reference
 Previous Reply
 This Message
 Reply
 Next Reply
Hi,

I have a project here with German messages in the program code I like to
translate using Locale::TextLocale 1.14 (currently without XS
optimization). Perl version is 5.8.5. The program file encoding is
ISO-8859-1, so I set xgettext --from-code=ISO-8859-1 in the Makefile.

The generated .pot and .po files have the messages converted to UTF-8,
no problem so far. The "Content-Type" header is set to UTF-8
accordingly, everyhing looks consistent.

This is my en.po file:

  msgid ""
  msgstr ""
  "Project-Id-Version: l10ntest 1.0\n"
  "Report-Msgid-Bugs-To: Joern Reder <joern AT zyn.de>\n"
  "POT-Creation-Date: 2005-08-16 10:04+0200\n"
  "PO-Revision-Date: 2005-08-16 10:02+CET\n"
  "Last-Translator: Joern Reder <>\n"
  "Language-Team: Joern Reder <>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"

  #: ../test.pl:8
  msgid "Datei öffnen"
  msgstr "Open file"

  #: ../test.pl:9
  msgid "Datei oeffnen"
  msgstr "Open file"

But all message id's with ISO-Latin 8bit characters are not translated.
Obviously something with the message catalog lookup doesn't work here as
expected. My test program looks like this (really simple and
straightforward ;)

  use strict;
  use lib 'lib';
  use Locale::TextDomain ("test");
  print __"Datei öffnen","\n";
  print __"Datei oeffnen","\n";

The first message gets translated, but the second not.

What am I doing wrong?

Thanks,

Joern

--
LINUX - Linux Is Not gnU linuX
Attachments
 1  +-index.html message/rfc822  

ATTENTION: HTML attachments to this mail have been converted to plain text to prevent you from possibly malicious HTML files. Other attachments are included here without any checking. Choose your own poison! The maintainers of this site cannot be held responsible for any damage caused by these attachments.

 Problem with non-ASCII message id's
 Previous Thread
 Next Thread
 Start of Thread
 Reference
 Previous Reply
 This Message
 Reply
 Next Reply
 
 08/16/05 09:09:12 GMT  JörnReder
 08/16/05 12:58:20 GMT  +--Guido Flohr
 08/16/05 14:01:13 GMT    |--JörnReder
 08/16/05 15:22:33 GMT    |  +--Guido Flohr
 08/17/05 11:00:11 GMT    |    |--JörnReder
 08/18/05 07:30:54 GMT    |    +--JörnReder
 08/18/05 08:20:43 GMT    |      +--JörnReder
 08/18/05 09:05:35 GMT    |        +--Guido Flohr
 08/17/05 08:29:41 GMT    +--Bruno Haible

Powered by Imperia
Home | Top | Imprint