[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Slug header encoding
* ASAKURA Hiroshi wrote:
>I would like to propose to change the Slug header encoding method
>from RFC2047 to RFC3986(%-encodings). The reason is following:
>
> 1. RFC2047 has some issues.
> I wrote an article, see <http://photofriend.blogzine.jp/tech/>.
>
> 2. IRI and URI uses %-encodings.
> HTTP header has IRI or URI. These identifier can use
> percent encodings, and it is convenient for developer to use
> same encoding method for Slug header.
HTTP uses mime word encoding in headers, you cannot correctly implement
many core parts of RFC 2616 like the Content-Type header without support
for mime word encoding. The content of the Slug header is not a URI, it
would be confusing to treat it as such. As such I find your argument not
very convincing.
> 3. We should utf-8 for non-ASCII characters.
> Recently, specifications of IETF supports Unicode.
> For example, IRI(RFC3987):
> >An IRI is a sequence of characters from the Universal Character
> >Set(Unicode/ISO 10646).
>
> RFC2047 supports any encodings such as iso-2022-jp, shift-jis,
> euc-jp, utf-8 (for Japanese Kanji). APP Servers need to support
> them. But RFC3986 assume utf-8. APP Servers only need to
> support it.
This is a somewhat artificial distinction and argument. Just because
many character encodings could be used, does not mean you have to
support them all. Further, percent-encoding neither in IRIs nor in
URIs requires the use of the UTF-8 encoding, it is very well possible
that your percent-encoding library uses ISO-8859-1 resulting in Slug
headers that cannot be decoded. With mime word encoding that is much
less likely. Besides, the specification could require mime word en-
coding using the UTF-8 encoding, which would remove the concern. So,
this argument does not convince me either.
--
Björn Höhrmann · mailto:bjoern@xxxxxxxxxxxx · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/