We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated from rt.cpan.org#118004
Requestors: @binary-com
Attachments:
From @binary-com on 2016-09-21 03:26:57 I found one issue with Locale::Maketext module as explained below
Consider this as translated string
msgid "Opens late (at %1)" msgstr "�ffnet spät (um %1)"
So when I try to do maketext on this, i get this error
Malformed UTF-8 character (unexpected end of string) in string ne at /usr/share/perl/5.14/Locale/Maketext.pm line 541.
As a fix i changed this line https://metacpan.org/source/TODDR/Locale-Maketext-1.28/lib/Locale/Maketext.pm#L736
to
elsif(do {my $x = $1; substr($x,0,1)} ne '~') {
or to this
elsif(substr("$1",0,1) ne '~') {
then it works fine.
Additional information:
Perl Version: 5.14.2 Module Version: 1.28 I have attached the output.log as trace if you need it, attached below is snippet of it SV = PVMG(0x1ead340) at 0x1ed8600 REFCNT = 1 FLAGS = (GMG,SMG,pPOK,UTF8) IV = 0 NV = 0 PV = 0x58edf40 "\303\226ffnet sp\303\244t (um "\0 [UTF8 "\x{d6}ffnet sp\x{e4}t (um "] CUR = 18 LEN = 952 MAGIC = 0x39cb390 MG_VIRTUAL = &PL_vtbl_utf8 MG_TYPE = PERL_MAGIC_utf8(w) MG_LEN = -1 MG_PTR = 0x39c46f0 0: 1 -> 1 1: 0 -> 0 MAGIC = 0x1edf8b0 MG_VIRTUAL = &PL_vtbl_sv MG_TYPE = PERL_MAGIC_sv(\0) MG_OBJ = 0x1ed85e8 MG_LEN = 1 MG_PTR = 0x1edf4e0 "1" SV = PV(0x575c630) at 0x20710c8 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x3aac1e0 "\303"\0SV = PVMG(0x1ead340) at 0x1ed8600 REFCNT = 1 FLAGS = (GMG,SMG,pPOK,UTF8)
The first dump is $1. That one is correct. It's a UTF8 string (\303\244...) and the UTF8 flag is set.
$1
\303\244...
The 2nd one is the substr result.
substr
It's value is only \303, one byte. But the UTF8 flag is set.
\303
The text was updated successfully, but these errors were encountered:
That fix shouldn't fix anything, something weird is going on here.
Sorry, something went wrong.
No branches or pull requests
Migrated from rt.cpan.org#118004
Requestors:
@binary-com
Attachments:
From @binary-com on 2016-09-21 03:26:57
I found one issue with Locale::Maketext module as explained below
Consider this as translated string
So when I try to do maketext on this, i get this error
Malformed UTF-8 character (unexpected end of string) in string ne at /usr/share/perl/5.14/Locale/Maketext.pm line 541.
As a fix i changed this line https://metacpan.org/source/TODDR/Locale-Maketext-1.28/lib/Locale/Maketext.pm#L736
to
or to this
then it works fine.
Additional information:
The first dump is
$1
. That one is correct. It's a UTF8 string (\303\244...
) and the UTF8 flag is set.The 2nd one is the
substr
result.It's value is only
\303
, one byte. But the UTF8 flag is set.The text was updated successfully, but these errors were encountered: