From: Bruno Haible Date: Mon, 12 Jan 2004 11:12:12 +0000 (+0000) Subject: Make it work with Perl 5.8.0. X-Git-Tag: v0.14~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9575d707c5c072ca00b4e4967f32b0241d213539;p=thirdparty%2Fgettext.git Make it work with Perl 5.8.0. --- diff --git a/gettext-tools/examples/ChangeLog b/gettext-tools/examples/ChangeLog index 516063dba..12a66deda 100644 --- a/gettext-tools/examples/ChangeLog +++ b/gettext-tools/examples/ChangeLog @@ -1,3 +1,10 @@ +2003-12-29 Bruno Haible + + * 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 * hello-csharp: New subdirectory. diff --git a/gettext-tools/examples/hello-perl/INSTALL b/gettext-tools/examples/hello-perl/INSTALL index 6fc80440b..609157aa2 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 4ae7123d2..885311ab6 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 529545900..76573b2a9 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());