My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  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:  ----
Cc:  johnjbar...@johnjbarton.com, odva...@gmail.com
1.5
net


Sign in to add a comment
 
Reported by hatchetm...@gmail.com, 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"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<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)

index.xhtml
1.5 KB   Download
index.js
1.9 KB   Download
news.json
516 bytes   Download
Jan 14, 2008
#1 hatchetm...@gmail.com
additional details i failed to mention in the original submission:
im using firebug 1.05 on firefox 2.0.0.11 in windows XP SP2
Jan 15, 2008
Project Member #2 johnjbar...@johnjbarton.com
Please try firebug 1.1, http://fireclipse.xucia.com and let us know how it works for
this issue.  Thanks, John.
Labels: 1.05
Jan 15, 2008
#3 hatchetm...@gmail.com
Hi.
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.
index.xhtml
986 bytes   Download
index.js
82 bytes   Download
dirrerentlyEncodedScriptFile.js
117 bytes   View   Download
Jan 15, 2008
Project Member #4 johnjbar...@johnjbarton.com
(No comment was entered for this change.)
Owner: johnjbar...@johnjbarton.com
Labels: -1.05 debugger
Dec 18, 2009
Project Member #5 johnjbar...@johnjbarton.com
Tests online at http://getfirebug.com/tests/issues/429

Honza this related to charset issues
Status: Triaged
Cc: johnjbar...@johnjbarton.com odvarko
Labels: -Priority-Medium 1.5 Test-case-available
Dec 18, 2009
Project Member #6 johnjbar...@johnjbarton.com
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
miscoded.
Dec 18, 2009
Project Member #7 johnjbar...@johnjbarton.com
And now the change to the bug I was really after....
Owner: ---
Dec 22, 2009
Project Member #8 odva...@gmail.com
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:
http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/9ed8df75aa4b1f86?hl=en#

Honza

Dec 23, 2009
Project Member #9 odva...@gmail.com
Bug reported here:
https://bugzilla.mozilla.org/show_bug.cgi?id=536529

Honza
Labels: bugzilla
Oct 16, 2010
Project Member #10 johnjbar...@johnjbarton.com
The bugzilla was marked invalid

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

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