Subject: | Encoding names should be case-insensitive |
Hi,
perl -MEncode -e "print decode('UTF-16LE', '')"
perl -MEncode -e "print decode('utf-16le', '')"
Unknown encoding 'utf-16le' at -e line 1
perl -MEncode -e "print decode('MIME-Q', '')"
perl -MEncode -e "print decode('MiME-Q', '')"
Unknown encoding 'MiME-Q' at -e line 1
perl -MEncode -e "print decode('eUc-Cn', '')"
perl -MEncode -e "print decode('euc-cn', '')"
...
IOW, for some encodings the name is treated case-sensitive, for other encodings it is case-insensitive. This is sub-optimal design as you never really know which spelling would be correct (canonical names are all-lowercase, MixedCase, UPPERCASE, etc) and usually these names are considered case-insensitive, so it seems to be a bug to consider e.g. "utf-16le" unsupported if uc("utf-16le") is supported.