Bug 69115 - JS parse errors on microsoft.com (UTF-8)
Summary: JS parse errors on microsoft.com (UTF-8)
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-27 03:24 UTC by George Staikos
Modified: 2003-11-29 16:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Staikos 2003-11-27 03:24:52 UTC
Error: http://msdn.microsoft.com/library/mnp/2/aspx/js.aspx?&path=/library/
include/ctredir.js&name=Masthead: TypeError: Value undefined (result of 
expression window.attachEvent) is not an object. Cannot be called. 
Error: http://msdn.microsoft.com/: TypeError: Value undefined (result of 
expression window.attachEvent) is not an object. Cannot be called. 
Error: http://msdn.microsoft.com/msdn-online/shared/js/msdnsearchcontrol.js: 
SyntaxError: Parse error at line 2 
 
These come up right away when hitting http://msdn.microsoft.com/
Comment 1 Harri Porten 2003-11-27 10:32:23 UTC
The msdnsearchcontrol.js starts with a hexadecimal efbbbf sequence. A marker for UTF-8. Which library should do the decoding ?
Comment 2 Thiago Macieira 2003-11-27 21:41:42 UTC
UNIX doesn't use the Byte Order Mark encoded in UTF-8 to identify UTF-8 text files. That's a Microsoft invention.

The charset should be provided in the HTTP header and it's not:
kio_http: (3197) "Content-Type: application/x-javascript"

That is, unless the standard says JS scripts are supposed to be encoded in UTF-8.
Comment 3 Harri Porten 2003-11-29 00:10:06 UTC

*** This bug has been marked as a duplicate of 63498 ***
Comment 4 Dirk Mueller 2003-11-29 16:08:09 UTC
its not really a duplicate
Comment 5 Dirk Mueller 2003-11-29 16:10:54 UTC
Subject: kdelibs/khtml [POSSIBLY UNSAFE]

CVS commit by mueller: 

* misc/loader.cpp (CachedCSSStyleSheet/CachedScript::data): add some utf8/utf16 encoding
  handling. Workaround Qt bugs (#69115). Initial investigation and patch by Harri.

CCMAIL: 69115-done@bugs.kde.org


  M +5 -0      ChangeLog   1.125
  M +45 -28    misc/loader.cpp   1.160 [POSSIBLY UNSAFE: qDebug]
  M +4 -2      misc/loader.h   1.63