[Webkit-unassigned] [Bug 17182] New: charset declared with document, write (in an external Javascript) is not honored.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 5 11:41:03 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17182

           Summary: charset declared with document,write (in an external
                    Javascript) is not honored.
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: All
               URL: http://i18nl10n.com/webkit/enc_extjs.html
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jungshik.shin at gmail.com


(this report contains non-ASCII characters in UTF-8. View this with the
encoding set to UTF-8). 

* How to reproduce
  1. Go to the url above (which is a reduced test case of
http://event.naver.com )

* Expected:
   Two Korean syllables, '가각' should appear. (in case of Naver, Korean
characters should come up everywhere)

* Actual: 
   '°¡°¢' in place of '가각' show up.  ('가각' in EUC-KR is 0xB0 0xA1
0xB0 0xA2 and when they're interpreted as ISO-8859-1, they become '°¡°¢'). 

http://event.naver.com (Naver has the largest market share (over 70%) in Korean
web search/portal ) uses a very strange way of setting the page encoding. The
charset is set in an external javascript file referred to by the html file. The
JS file in question is http://event.naver.com/include/head2.inc. It has the
following lines:

------------------------
document.write("\
<html>\
<head>\
<meta http-equiv='Content-type' content='text/html; charset=euc-kr'>\
<title>네이버 :: 이벤트</title>\
<link rel=stylesheet type=text/css href=http://event.naver.com/event.css>\
<!-- 신규 추가  GNB ---->\
<!-- 이미 이 부분이 들어가 있는 서비스라면 또 넣지 않아도
됩니다. -->\
<script type=text/javascript>document.domain = 'naver.com';</script>\
<!-- 신규 추가  GNB---->\
</head>\
<body topmargin=0 rightmargin=0 bottommargin=50 leftmargin=0 bgcolor=#FFFFFF>\
<center>\
... snip ... "); 

--------------

Firefox honors the meta charset declared this way (when testing this, make sure
to turn OFF the encoding detector in FF and to set the default encoding in FF
to something other than Korean (EUC-KR)/ Korean (UHC)).  

MS IE does not. (how could Naver have this page in Korea where IE has 99%
market share?  They rely on the fact that the default encoding of IE is set to
Korean (Windows-949) in Korea).  

What to do about it?  

I've come across several sites with this strange way of charset declaration
before. If it can be done easily, we'd want to do that. Otherwise, this is an
evangelism issue (For Naver, I'll talk to my contact there to FIX this).


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list