[Po4a-commits] r2658 - /trunk/lib/Locale/Po4a/Text.pm

barbier at users.alioth.debian.org barbier at users.alioth.debian.org
Sat Oct 20 20:21:52 UTC 2012


Author: barbier
Date: Sat Oct 20 20:21:52 2012
New Revision: 2658

URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2658
Log:
Fix the computation of text width when Unicode::GCString is not available

Modified:
    trunk/lib/Locale/Po4a/Text.pm

Modified: trunk/lib/Locale/Po4a/Text.pm
URL: http://svn.debian.org/wsvn/po4a/trunk/lib/Locale/Po4a/Text.pm?rev=2658&op=diff
==============================================================================
--- trunk/lib/Locale/Po4a/Text.pm (original)
+++ trunk/lib/Locale/Po4a/Text.pm Sat Oct 20 20:21:52 2012
@@ -388,6 +388,7 @@
             if ($UnicodeGCString_available) {
                 return Unicode::GCString->new($text)->columns();
             } else {
+                $text =~ s/\n$//s;
                 return length($text) if !(defined($encoder) && $encoder->name ne "ascii");
                 die wrap_mod("po4a::text",
                     dgettext("po4a", "Detection of two line titles failed at %s\nInstall the Unicode::GCString module!"), shift)




More information about the Po4a-commits mailing list