Closed rwmjones closed 1 month ago
I think one problem is there may not be any error at all? The use of eval { .. } or do
appears to be wrong, it should be:
--- Locale/Po4a/TransTractor.pm.orig 2024-04-12 21:57:05.646411787 +0100
+++ Locale/Po4a/TransTractor.pm 2024-04-12 21:57:55.136864282 +0100
@@ -511,7 +511,8 @@
map { print $fh $_ } $self->docheader();
eval {
map { print $fh $_ } @{ $self->{TT}{doc_out} };
- } or do {
+ };
+ if ($@) {
my $error = $@ || 'Unknown failure';
chomp $error;
if ( $charset ne 'UTF-8' && $error =~ /^"\\x\{([^"}]*)\}"/ ) {
Happens with: perl-interpreter-5.38.2-506.fc40.x86_64
Does not happen with: perl-interpreter-5.32.1-480.el9.x86_64
Closed #494 as completed via fe3baba.
Thanks, can confirm this fixes the problem for me.
po4a-translate
gives this error which is hard to understand when run on a file.The PO file is this one: https://github.com/libguestfs/guestfs-tools/blob/master/po-docs/ja.po The input file is this one: https://raw.githubusercontent.com/libguestfs/libguestfs-common/master/mlcustomize/customize-synopsis.pod
I don't believe there are any malformed / non-UTF-8 characters in those files, at least nothing that I can see or that
iconv
cannot parse.The problem is really that the error message doesn't actually say what is malformed, so I have no further information to go on here.