summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gettext-tools/examples/ChangeLog7
-rw-r--r--gettext-tools/examples/hello-perl/INSTALL1
-rw-r--r--gettext-tools/examples/hello-perl/hello-1.pl.in2
-rw-r--r--gettext-tools/examples/hello-perl/hello-2.pl.in2
4 files changed, 12 insertions, 0 deletions
diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog
index 516063d..12a66de 100644
--- a/gettext-tools/examples/ChangeLog
+++ b/gettext-tools/examples/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-29 Bruno Haible <bruno@clisp.org>
+
+ * hello-perl/INSTALL: Mention that libintl-perl-1.09 required.
+ * hello-perl/hello-1.pl.in, hello-perl/hello-2.pl.in: Inhibit the
+ automatic UTF-8 conversion in UTF-8 locales with Perl-5.8.0. Thanks to
+ Guido Flohr.
+
2003-12-26 Bruno Haible <bruno@clisp.org>
* hello-csharp: New subdirectory.
diff --git a/gettext-tools/examples/hello-perl/INSTALL b/gettext-tools/examples/hello-perl/INSTALL
index 6fc8044..609157a 100644
--- a/gettext-tools/examples/hello-perl/INSTALL
+++ b/gettext-tools/examples/hello-perl/INSTALL
@@ -1,5 +1,6 @@
This example relies on:
- Perl (perl)
+ - libintl-perl 1.09 or newer
Installation:
./autogen.sh
diff --git a/gettext-tools/examples/hello-perl/hello-1.pl.in b/gettext-tools/examples/hello-perl/hello-1.pl.in
index 4ae7123..885311a 100644
--- a/gettext-tools/examples/hello-perl/hello-1.pl.in
+++ b/gettext-tools/examples/hello-perl/hello-1.pl.in
@@ -8,6 +8,8 @@
use Locale::Messages qw (textdomain bindtextdomain gettext);
use POSIX qw(getpid);
+binmode STDOUT, ':raw'; # Needed to make it work in UTF-8 locales in Perl-5.8.
+
sub _ ($) { &gettext; }
textdomain "hello-perl";
diff --git a/gettext-tools/examples/hello-perl/hello-2.pl.in b/gettext-tools/examples/hello-perl/hello-2.pl.in
index 5295459..76573b2 100644
--- a/gettext-tools/examples/hello-perl/hello-2.pl.in
+++ b/gettext-tools/examples/hello-perl/hello-2.pl.in
@@ -8,6 +8,8 @@
use Locale::TextDomain ("hello-perl" => "@localedir@");
use POSIX qw(getpid);
+binmode STDOUT, ':raw'; # Needed to make it work in UTF-8 locales in Perl-5.8.
+
print __"Hello, world!";
print "\n";
print __x ("This program is running as process number {pid}.", pid => getpid());