My favorites | Sign in
Project Home Wiki Issues
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 429: firebug not handling charset attribute for <script> tags
12 people starred this issue and may be notified of changes. Back to list
Status:  Triaged
Owner:  ----

Sign in to add a comment
Reported by, Jan 14, 2008
when debugging an html file written in UTF-8, which contains <script> tags
who "point" to ISO-8859-1 encoded *.js files, firebug displays the contents
of such *.js files as gibberrish.

i cam across this issue while building a small "hello world" site to learn
ext js: all of mu files are UTF-8 while the ext-js files are in iSO-8859-1,
which means my html looks like this :

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="" xml:lang="en">
		<title>empty xhtml 1.1 template</title>

		<!-- ext-js dependencies (debug versions) -->
		<script type="text/javascript" src="../ext-2.0/adapter/ext/ext-base.js"
charset="ISO-8859-1" />

note : i've attached all of my own files. the code assumes the existance of
2 ext-js files, which will be needed to fully recreate the problem.
the problem would menifest just as soon as firebug is loaded and you try to
view the contents of any *.js files (for instance, the ext-js files)

1.5 KB   Download
1.9 KB   Download
516 bytes   Download
Jan 14, 2008
additional details i failed to mention in the original submission:
im using firebug 1.05 on firefox in windows XP SP2
Jan 15, 2008
Project Member #2
Please try firebug 1.1, and let us know how it works for
this issue.  Thanks, John.
Labels: 1.05
Jan 15, 2008
the issue is still present with firebug 1.1.0b10.
i've included a more concise "bug recreation kit" (attached files).
after loading the xhtml file, open firebug (CTRL + F12), select the "script" tab, and
try to view the contents of "differentlyEncodedScriptFile.js" - you'll see gibber.
this time around nothing but these 3 files is needed to recreate the effect.
as a side note, there might be a bigger issue with detecting the encoding for even
the "root" xhtml file itself: while playing around with the example to make sure it
works (as im writing these lines) i had 2 open tabs in firefox : the one displaying
fbug issue 429 and the other displaying my xhtml file, and when i switched over to
the xhtml file and opened firebug _both_ *.js files had gibber for content when
viewed from inside firebug...

Thank you very much for trying to help, and please notify me if you need any more info.
986 bytes   Download
82 bytes   Download
117 bytes   View   Download
Jan 15, 2008
Project Member #4
(No comment was entered for this change.)
Labels: -1.05 debugger
Dec 18, 2009
Project Member #5
Tests online at

Honza this related to charset issues
Status: Triaged
Cc: odvarko
Labels: -Priority-Medium 1.5 Test-case-available
Dec 18, 2009
Project Member #6
The index.xhtml file shows one form of the problem: The
dirrerentlyEncodedScriptFile.js is miscoded.
 The modified_index.xhtml has another one: now the first file fine bug index.js is
Dec 18, 2009
Project Member #7
And now the change to the bug I was really after....
Owner: ---
Dec 22, 2009
Project Member #8
I can reproduce that problem, thanks for the test case!

I believe the storePartialResponse, should read request.contentCharset attribute and
pass it to the convertToUnicode (instead of using the win.document.characterSet for
all responses). The problem is that the request.contentCharset is empty even if the
"charsst" attribute (for <script> element) is properly specified.

I am asking here:


Dec 23, 2009
Project Member #9
Bug reported here:

Labels: bugzilla
Oct 16, 2010
Project Member #10
The bugzilla was marked invalid

Boris says in the newsgroup:
>nsITraceableChannel gives you bytes.  How do you convert the bytes to

I guess it does not matter because we don't know which script tag is loading the bytes.
Labels: -bugzilla net
Sign in to add a comment

Powered by Google Project Hosting