pali
pali
Look at PerlIO::encoding source code, by default are set these bits: ``` our $fallback = Encode::PERLQQ()|Encode::WARN_ON_ERR()|Encode::STOP_AT_PARTIAL(); ``` Coderef check is supported only by some XS Encode modules, probably not by...
Looks like this is not Encode bug, but PerlIO::encoding! And PerlIO is part of Perl itself. Please report this bug directly to Perl. I used this test script: ``` use...
Bug is in PerlIO::scalar and was fixed in perl 5.25.8 by this commit: https://perl5.git.perl.org/perl.git/commit/c47992b404786dcb8752239045e21cbcd7e3d103
Primary use case is: Load & convert OpenAPI 3 YAML file correctly to Perl in-memory structure (e.g. hashref/arrayref). We have already find out that e.g. Python YAML parser has problems...
> So by explicitly using the JSON schema in YAML::PP you should be safe. Ok, thank you very much for information.
> Maybe it's simply not possible to detect if data is binary. Yes, this is not possible. You must declare in API if input should be treated as binary (and...
Based on above description, here is my proposed change with API that binary schema expects 8-bit data: ```diff diff --git a/lib/YAML/PP/Schema/Binary.pm b/lib/YAML/PP/Schema/Binary.pm index 30b4491..a63fa64 100644 --- a/lib/YAML/PP/Schema/Binary.pm +++ b/lib/YAML/PP/Schema/Binary.pm @@...
@2shortplanks is fully right! UTF8 flag is relevant only for XS code and says if returned C char* buffer is encoded in UTF-8 or in Latin1. UTF8 flag does not...
https://metacpan.org/pod/Encode#is_utf8 * Typically only necessary for debugging and testing * Don't use this flag as a marker to distinguish character and binary data * If STRING has UTF8 flag set,...
`utf8::upgrade` in pure perl code basically do nothing (it is just optimization for following string operations) and can be fully avoided. It does not do any validation nor check. `decode_utf8`...