Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > perl.unicode > #203 > unrolled thread
| Started by | pali@cpan.org |
|---|---|
| First post | 2016-08-13 19:41 +0200 |
| Last post | 2016-08-22 15:19 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to perl.unicode
Encode utf8 warnings pali@cpan.org - 2016-08-13 19:41 +0200
Re: Encode utf8 warnings pali@cpan.org - 2016-08-22 15:19 +0200
| From | pali@cpan.org |
|---|---|
| Date | 2016-08-13 19:41 +0200 |
| Subject | Encode utf8 warnings |
| Message-ID | <201608131941.51319@pali> |
Hello, I see that there is one big mess in utf8 warnings for Encode. First, warnings should be enabled by warnings pragma. For utf8 there are: utf8, non_unicode, nonchar, surrogate. Second, warnings for Encode can be enabled by check flag Encode::FB_WARN or Encode::WARN_ON_ERR. Third, warnings for perlio :encoding layer can be enabled via $PerlIO::encoding::fallback variable (same flags as for Encode module). And here is problem: Should Encode utf8 throw warnings if: * utf8 warnings are enabled by pragma, but not enabled via Encode check flags? * utf8 pragma warnings are disabled, but Encode WARN_ON_ERR bit enabled? * utf8 pragma warnings are disabled and $PerlIO::encoding::fallback variable was not modified? There are couple of bugs and comments about this problem: https://rt.cpan.org/Public/Bug/Display.html?id=88592 https://github.com/dankogai/p5-encode/pull/26#issuecomment-235641347 https://rt.perl.org/Public/Bug/Display.html?id=128788 https://rt.cpan.org/Public/Bug/Display.html?id=116629 https://github.com/dankogai/p5-encode/issues/59 https://github.com/dankogai/p5-encode/commit/a6c2ba385875c2c03bd42350e23aef0188fb23b0 https://github.com/dankogai/p5-encode/commit/07c8adb58e55c7cf66b3d6673bf50010fe1a69ea I think that we need to declare how should utf8 pragma warnings interference with Encode WARN_ON_ERR for Unicode encodings (Encode::utf8 and Encode::Unicode). Documentation: https://metacpan.org/pod/warnings https://metacpan.org/pod/Encode#FB_WARN https://metacpan.org/pod/PerlIO::encoding
[toc] | [next] | [standalone]
| From | pali@cpan.org |
|---|---|
| Date | 2016-08-22 15:19 +0200 |
| Message-ID | <20160822131923.GA20735@pali> |
| In reply to | #203 |
On Saturday 13 August 2016 19:41:46 pali@cpan.org wrote: > Hello, I see that there is one big mess in utf8 warnings for Encode. Per request this discussion was moved to perl5-porters@perl.org ML: http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg239061.html
[toc] | [prev] | [standalone]
Back to top | Article view | perl.unicode
csiph-web