Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 7835
Status: resolved
Priority: 0/
Queue: Encode

People
Owner: DANKOGAI [...] cpan.org
Requestors: bjoern [...] hoehrmann.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.02
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Subject: Encoding names should be case-insensitive
X-RT-Original-Encoding: iso-8859-1
Content-Length: 779
Download (untitled) / with headers
text/plain 779b
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.
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 943
Download (untitled) / with headers
text/plain 943b
[BJOERN - Thu Sep 30 18:33:54 2004]: Show quoted text
> 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.
They were supposed to be case insensitive. And they were for most cases -- that is, whenever the canonical encoding was in all lowercase. Such encodings as MacSomething, MIME-* slipped from aliasing. As for "UTF-16LE", it was not case per se; the canonical name was "UTF16-LE", no hyphen between "UTF" and "16". So it was a regex bug which failed to strip '-'. I have fixed the bug in my repository so it'll be fixed in next encode. Dan the Maintainer Thereof


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.