Re: Default charset patch (bug 0000068)

Rune Saetre <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi

Good point.

I looked this up in RFC 2616. Snipped from section 3.7.1:

   The "charset" parameter is used with some media types to define the
   character set (section 3.4) of the data. When no explicit charset
   parameter is provided by the sender, media subtypes of the "text"
   type are defined to have a default charset value of "ISO-8859-1" when
   received via HTTP. Data in character sets other than "ISO-8859-1" or
   its subsets MUST be labeled with an appropriate charset value. See
   section 3.4.1 for compatibility problems.

So assuming ISO-8859-1 for the "text" type if nothing else is declared
seems to be what the RFC specifies.

I will make a patch that checks for type "text" as soon as I have some
time.

Regards
Rune

---
Rune Sætre <[email protected]>
NetCom as, Infrastruktur
Telefon (mob): 934 34 285
..

On Mon, 6 Dec 2004, Guillaume Cottenceau wrote:

> Rune Saetre <rune.saetre 'at' netcom-gsm.no> writes:
>
> > Hi
> >
> > Here is a patch for setting a default charset if none is indicated in the
> > http reply. Id is fixed as indicated in bug report 0000068.
> >
> >   http://bugs.kannel.org/view_bug_advanced_page.php?f_id=0000068
> >
> > It seems to be required to see pages using international characters
> > where the charset is not indicated by the server.
> > There are a lot of these here in Norway.
> >
> > This works for me, and I have not found any ill effects (yet).
>
> As far as I know, this may violate the RFC.
>
> Do you have any pointer indicating that not specified charsets
> must be considered ISO-8859-1?
>
> As far as I can see, 3.7.1 specifies that subtypes of "text" must
> be assumed ISO-8859-1 when no charset is specified, e.g. not all
> types.
>
> I think your patch should at least verify we are receiving a
> subtype of "text".
>
> --
> Guillaume Cottenceau
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.