Closed Bug 389269 Opened 17 years ago Closed 15 years ago

form created using javascript submits data using wrong encoding

Categories

(Firefox :: General, defect)

2.0 Branch
x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: vytis, Unassigned)

Details

(Whiteboard: [CLOSEME 5-15-2010])

Attachments

(1 file)

357 bytes, text/html; charset=windows-1251
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; lt; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; lt; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5 I think, this is somehow related with Bug 380383. I bookmarklet which takes title of current page, then creates form in current page (this is difference from Bug 380383) using document.write, then submits data to my own page. If i use script on IE6, on my page i get data with correct encoding. I see correct encoding, in all cases: if i come from page with windows-1251, windows-1257, utf8, iso-8859-1 (german) If i use FF 2.0.0.5 , i get data in wrong encoding. It seems that data are sent as iso-8859-1. I see wrong encoding, in all cases: if i come from page with windows-1251, windows-1257, utf8, and even iso-8859-1 (german). I see german letters only if i make encode to utf8. (this is not neccesary if i post with ie6) Reproducible: Always
Attached file testcase
I tried to test it with this testcase. With this testcase, it is worksforme. But probably I'm misunderstanding this. Could you perhaps attach a testcase (or give an example) that shows the issue?
Attachment #273441 - Attachment mime type: text/html → text/html; charset=windows-1251
Your test case shows that on client side form has correct encoding. Problem occurs when you try to submit data using "post". Steps to reproduce: 1. put to bookmarks following javascript javascript:(function(){o=document;r="<form style=\"display:none;\" method=post action=\"http://ENTER HERE YOUR SERVER\"><input name=t value=\""+o.title+"\">";o.open();o.write(r);o.close();o.forms[o.forms.length-1].submit()})() 2. replace "ENTER HERE YOUR SERVER" with your server name. 3. open page with windows-1257 encoding, for example http://lrytas.lt 4. click on new created bookmark. Expected result : Data are submited to my server with correct encoding. All lithuanian letters are displayied correctly. This is how script works on IE6. Actual results on FF 2.0.0.5: Data are submited to my server with incorrect encoding. Lithuanian letters are not displayed. if i make encode to utf8, then i get text in iso-8859-1. Another Case: 1-2. steps are the same. 3. open german page with iso-8859-1 encoding, for example http://spiegel.de 4. click on new created bookmark. Actual results on FF 2.0.0.5: Data are submited to my server with incorrect encoding. German letters are not displayed. But if i encode text to utf8, then i get correct german text.
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME http://www.mozilla.com http://support.mozilla.com/kb/Managing+profiles http://support.mozilla.com/kb/Safe+mode
Whiteboard: [CLOSEME 5-15-2010]
Version: unspecified → 2.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.x or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: