[Qt-interest] Add new alias to existing QTextCodec

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Wed Feb 23 06:30:25 CET 2011


Hi,

Yet I've not checked how Qt handles the charset/encoding
given by HTTP or HTML, but personally I'm questionable if
passing "x-euc-jp" (furthermore, all x-foo charsets/encodings)
to QTextCodec::codecForName() is good idea. I think they
are mainly used by web-related field, so it should be
trasnlated to more standard charset/encoding name by web-
related framework, forced to say, WebKit or WebCore.
I will try to find how to do such, when I got a sparetime.

Checking very legacy ChangeLog of WebCore, it is noted that
"x-sjis" was cared by WebCore. Or, x-foo like charset/
encoding specification is so widely used (out of web-related
field) and QTextCodec should care for it?

Regards,
mpsuzuki

On Wed, 23 Feb 2011 14:01:01 +0900
"KIMURA, Hidetaka" <kimura at jig.jp> wrote:

>Hi all,
>
>Charset detection of this page is failed with demo browser.
>http://ranking.rakuten.co.jp/
>
>The server sends Content-Type header with "x-euc-jp" but the content is
>encoded with euc-jp. I thought that if i could add a new alias "x-euc-jp"
>to an existing QTextCodec, charset detection will succeeds. Is there any
>way to add a new alias?
>
>i.e.
>I would like to QTextCodec::codecForName("x-euc-jp") and
>QTextCodec::codecForName("euc-jp") return same pointer.
>
>Thanks.
>
>-------
>KIMURA, Hide - kimura at jig.jp
>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at qt.nokia.com
>http://lists.qt.nokia.com/mailman/listinfo/qt-interest



More information about the Qt-interest-old mailing list