Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.rc > #365093
| From | Martin Quinson <Martin.Quinson@ens-rennes.fr> |
|---|---|
| Newsgroups | linux.debian.bugs.rc |
| Subject | Bug#1073038: po4a: Fails due to undefined subroutine Locale::Po4a::Pod::dgettext |
| Date | 2024-06-13 00:10 +0200 |
| Message-ID | <IOEkj-2tmP-49@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <IOrQ5-2lyh-7@gated-at.bofh.it> <IOwwp-2oo1-5@gated-at.bofh.it> <IOxVv-2pn3-1@gated-at.bofh.it> <IOmnn-2hJM-7@gated-at.bofh.it> <IOxVv-2pn3-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hello, I just commited a fix for the undefined subroutine error. Le mercredi 12 juin 2024 à 17:14 +0200, Guillem Jover a écrit : > > That fixed that issue but then it fails with: > > > > ,--- > > PO4A man.stamp > > po4a::pod: The file deb-buildinfo.pod declares utf8 as encoding, but you > > provided UTF-8 as master charset. Please change either > > setting. > > at /usr/bin/po4a line 1663. > > make[2]: *** [Makefile:902: man.stamp] Error 255 > > `--- > > I think the charset comparison is too naive though, and does not cover > for example any aliases listed in «man Encode::Supported». I think a > better comparison logic could look like this: > > ,--- > use Encode; > > my $enc_charset = Encode::find_encoding($charset); > my $enc_master_charset = Encode::find_encoding($master_charset); > > say 'match' if $enc_charset->mime_name eq $enc_master_charset->mime_name; > `--- > > Unfortunately neither Encode::find_encoding()->name nor > Encode::resolve_alias() seem helpful here because they return > "utf-8-strict" for "UTF-8" which will not match against "utf-8" for > the canonical "utf8". The problem is that Perl has a rather unexpected behavior wrt utf8, UTF-8 and UTF8. These names are not aliases of others in Perl. See https://perldoc.perl.org/Encode#UTF-8-vs.-utf8-vs.-UTF8 So I don't think that you will find a piece of Perl code that will allow to merge these names to declare that they are equivalent. In some sense, that's the essence of all issues I introduced in po4a v0.70 when introducing perlIO to control the encoding issues. I went from a lax system being utf8 by default but happily taking latin-1 encoding files to a much stricter UTF-8 system by default and forcing the user to specify if they want another encoding. Instead, I just pushed a commit changing the error message when charsets are utf8 and UTF-8 to insist on the difference between these encodings in Perl. https://github.com/mquinson/po4a/commit/afe6e1344ffad9d87dd807a81ed6467d6101b15f Please tell me if it's enough. > I'm not sure whether lib/Locale/Po4a/Xml.pod might need a similar > treatment, because that might depend on what encodings are supported > in there, against what is supported in po4a I guess. Ah, good catch. I'd have forgotten this one. Thanks for your help chasing this down, Mt
Back to linux.debian.bugs.rc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1073038: po4a: Fails due to undefined subroutine Locale::Po4a::Pod::dgettext Guillem Jover <guillem@debian.org> - 2024-06-12 05:00 +0200 Bug#1073038: po4a: Fails due to undefined subroutine Locale::Po4a::Pod::dgettext Martin Quinson <Martin.Quinson@ens-rennes.fr> - 2024-06-13 00:10 +0200 Bug#1073038: marked as done (po4a: Fails due to undefined subroutine Locale::Po4a::Pod::dgettext) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-06-23 17:40 +0200
csiph-web