Comments (11)
This is really weird. We require Perl 5.12 since po4a v0.70 because we changed the way we handle UTF files. But I still fail to understand why it would be an issue on Perl 5.26.
Could you give me the output of file po/pod/ca.po
and of grep Encoding po/pod/ca.po
please?
from po4a.
Hi,
[ 8s] + /usr/bin/mkdir /home/abuild/rpmbuild/BUILDROOT/po4a-0.71-150500.105.1.x86_64
[ 8s] + cd po4a-0.71
[ 8s] + file po/pod/ca.po
[ 8s] po/pod/ca.po: GNU gettext message catalogue, UTF-8 Unicode text, with very long lines
[ 8s] + grep Encoding po/pod/ca.po
[ 8s] "Content-Transfer-Encoding: 8bit\n"
[ 8s] + perl Build.PL installdirs=vendor
...
[ 13s] Discard blib/man/ca/man3/Locale::Po4a::Xhtml.3pm.pod (13 of 21 strings; only 61.9% translated; need 80%).
[ 13s] Malformed encoding while writing to file /home/abuild/rpmbuild/BUILD/po4a-0.71/blib/man/ca/man3/Locale::Po4a::Xml.3pm.pod with charset UTF-8: "\x{00c3}" does not map to utf8 at lib/Locale/Po4a/TransTractor.pm line 513.
[ 13s] Close with partial character at lib/Locale/Po4a/TransTractor.pm line 526.
[ 13s] Died at Po4aBuilder.pm line 191.
[ 14s] error: Bad exit status from /var/tmp/rpm-tmp.GZEM2g (%build)
from po4a.
If that helps, I get the exact same issue on Ubuntu 20.04, with perl 5.30.0 and these commands shows the same results. except that instead of "\x{00c3}"
I have "\x{fffd}"
I tried on the 0.70 version of po4a
And got the same problem :
$ ./Build
$ Created META.yml and META.json
$ "\x{fffd}" does not map to UTF-8 at lib/Locale/Po4a/Po.pm line 613.
$ Close with partial character at lib/Locale/Po4a/Po.pm line 613.
$ Died at Po4aBuilder.pm line 169.
Using the command you requested (file and grep), I get the same output with the exception of the , with very long lines
which does not appear anymore
from po4a.
Hi,
As an excercise I update Leap 15.5 perl packages to 5.38 and po4a compiles sucessfully, so its something that change in Perl between 5.30 (as mentioned by Gastonia02) and 5.38
from po4a.
Thanks @elchevive, that's a precious info. Is there any chance to get the precise version of Perl for which po4a starts to fail?
I started reading the perldelta of each versions between 5.30 and 5.38, but that's quite a lot of changes actually.
from po4a.
Do we think this is the same bug as #494 ?
from po4a.
Hi,
Further testing shows me that some change between 5.33.6 (not working) and 5.33.7 (start working) should be the culprit.
from po4a.
The diff between the two versions regarding PerlIO encoding seems to be the following:
https://metacpan.org/release/ATOOMIC/perl-5.33.8/diff/HYDAHY%2Fperl-5.33.6/ext/PerlIO-encoding/encoding.pm
The fallback setting does not contain Encode::STOP_AT_PARTIAL()
anymore. Further digging underway.
The full diff between 5.33.6 and 5.33.7 is here: https://metacpan.org/release/RENEEB/perl-5.33.7/view/pod/perldelta.pod
from po4a.
I fail to reproduce the error :( Could someone test that the following patch helps? Alternatively, the commented line could be used instead of the one added without comments.
--- a/lib/Locale/Po4a/TransTractor.pm
+++ b/lib/Locale/Po4a/TransTractor.pm
@@ -504,6 +504,8 @@ sub write {
File::Path::mkpath( $dir, 0, 0755 ) # Croaks on error
if ( length($dir) && !-e $dir );
}
+ $PerlIO::encoding::fallback = FB_CROAK;
+ # $PerlIO::encoding::fallback = Encode::PERLQQ()|Encode::WARN_ON_ERR()|Encode::ONLY_PRAGMA_WARNINGS();
open( $fh, ">:encoding($charset)", $filename )
or croak wrap_msg( dgettext( "po4a", "Cannot write to %s: %s" ), $filename, $! );
}
from po4a.
from po4a.
Do we think this is the same bug as #494 ?
Nope, I don't think it's the same. I think that #495 is about partial chars being reported as an error in Perl 5.33 and not in modern ones while #494 was about a eval block returning false even in absence of error.
Another clue that it's not the same is that #495 shows the error msg Close with partial character at lib/Locale/Po4a/TransTractor.pm line 526
while #494 does not show anything before dying ("unknown error").
And a final clue: I was able to reproduce (and fix) #494 while I'm still trying to reproduce #495
from po4a.
Related Issues (20)
- Mb -> MB in the po4a-gettextize docs
- Weblate: Set a repository browser URL for po4a-doc HOT 5
- How to generate Markdown without line wrap? HOT 2
- seems update to po4a to 0.70 breaks builds of apt HOT 14
- UTF-8 "\xF3" does not map to Unicode at /usr/share/perl5/vendor_perl/Locale/Po4a/TransTractor.pm line 583 HOT 5
- seems update to po4a to 0.70 the alternate language man pages are no longer installed. HOT 5
- Accept-Languages + Accept on website returns incorrect languages HOT 3
- docbook: Multiline entities not translated HOT 3
- Failed to run 'po4a-gettextize' for 'sgml' format (Error while running onsgmls -p) HOT 2
- Feature Request: Keep maintaining 'po4a-xxx' utilities HOT 4
- #☑️
- Malformed encoding while writing to file <output> with charset utf-8: Unknown failure HOT 3
- Markdown tables not parsed properly
- Lots of warnings and errors when building texinfo-docs with po4a-traslated texinfo.texi HOT 1
- Is it possible to use translated (but outdated version) of changed paragraph in translated file? HOT 2
- second argument to Locale::Po4a::TransTractor::read now mandatory HOT 2
- Problem after PerlIO overhaul in v0.70 HOT 9
- Fails to build with perl 5.40 HOT 2
- Add custom placeholders for po4a componentes in Weblate HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from po4a.