[Bug 27435] Document.inputEncoding

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27435

--- Comment #16 from Arkadiusz Michalski (Spirit) <crimsteam@gmail.com> ---
(In reply to Philip Jägenstedt from comment #15)
> 1. Let Document.characterSet and aliases return lowercase, like IE.

But IE for inputEncoding always return uppercasee (for all names, like UTF-8,
BIG5, GB18030, WINDOWS-1250). So aliases to characterSet will never be correct
(if we take into account size of characters).

In other site returned value for encoding's name by browser are realy
inconsistent. I don't think anyone really create a code without prior
conversion to uppercase or lowercase when it is used in conditions. Changing to
always returning lowercase letters, in all cases, really break compatibility?

Some interesting result:

<meta charset="big5">
Firefox
document.characterSet: Big5
document.charset: undefined
document.inputEncoding: Big5
Chrome
document.characterSet: Big5
document.charset: Big5
document.inputEncoding: Big5
IE
document.characterSet: big5
document.charset: big5
document.inputEncoding: BIG5 

<meta charset="uff-8">
Firefox
document.characterSet: UTF-8
document.charset: undefined
document.inputEncoding: UTF-8 
Chrome
document.characterSet: UTF-8
document.charset: UTF-8
document.inputEncoding: UTF-8
IE
document.characterSet: utf-8
document.charset: utf-8
document.inputEncoding: UTF-8 

<meta charset="gbk">
Firefox
document.characterSet: gbk
document.charset: undefined
document.inputEncoding: gbk 
Chrome
document.characterSet: GBK
document.charset: GBK
document.inputEncoding: GBK
IE
document.characterSet: gb2312
document.charset: gb2312
document.inputEncoding: GB2312

<meta charset="gb18030">
Firefox
document.characterSet: gb18030
document.charset: undefined
document.inputEncoding: gb18030
Chrome
document.characterSet: gb18030
document.charset: gb18030
document.inputEncoding: gb18030
IE
document.characterSet: GB18030
document.charset: GB18030
document.inputEncoding: GB18030

If the various APIs can return different size of encoding names then I think
that minimum is add to the Encoding spec such information (somewhere near the
table which lists those names).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 27 November 2014 17:25:50 UTC