develooper Front page | perl.unicode | Postings from August 2016

Encode utf8 warnings

Thread Next
August 13, 2016 17:42
Encode utf8 warnings
Message ID:
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
* 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:

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).


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About