You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For JSON::PP, Cpanel::JSON::XS, and other similar modules, the decode method takes a binary string and the encode method produces a binary string when the utf8 flag is set on the object and a character string otherwise. For TOML::Tiny, this appears to be the current behavior:
Normal mode:
encode - produces a character string
decode - takes a character string
Strict mode:
encode - produces a character string
decode - takes a binary string
The difference in behavior for decode in strict mode appears to be due to this line.
My preference would be that TOML::Tiny takes a flag that controls the UTF-8 encoding/decoding, but at the very least this module should be internally consistent and document the behavior.
The text was updated successfully, but these errors were encountered:
For
JSON::PP
,Cpanel::JSON::XS
, and other similar modules, thedecode
method takes a binary string and theencode
method produces a binary string when theutf8
flag is set on the object and a character string otherwise. ForTOML::Tiny
, this appears to be the current behavior:Normal mode:
encode
- produces a character stringdecode
- takes a character stringStrict mode:
encode
- produces a character stringdecode
- takes a binary stringThe difference in behavior for
decode
in strict mode appears to be due to this line.My preference would be that
TOML::Tiny
takes a flag that controls the UTF-8 encoding/decoding, but at the very least this module should be internally consistent and document the behavior.The text was updated successfully, but these errors were encountered: