Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#487 closed defect (wontfix)

dojo.bind charset auto detection

Reported by: Moe Owned by: James Burke
Priority: high Milestone:
Component: IO Version: 0.2
Keywords: dojo.bind charset Cc:
Blocked By: Blocking:



i found out dojo has problems to detect the correct charset of a page, when it's not specified.

I loaded a page with:{
  url: "bereich_reservieren.php",
  load: function(type, data, evt){
    document.getElementById('nummernreservierung').innerHTML = data;
  mimetype: "text/html"});

and it replaced the german 'umlaute' (ä,ö,ü) to question marks (?) which is (as far as I know) typical when a ISO-8859-1 Document is mistaken as UTF-8 encoded. Therefore I added the following line in the "bereich_reservieren.php" to specify the charset of the page loaded:

header("Content-type: text/html; charset=ISO-8859-1"); 

and it worked.

I saw that there is a property djConfigbindEncoding? but setting this to

djConfig["bindEncoding"] = 'ISO-8859-1';

didn't work.

I found this line in the io.js but it doesn't seem to be used:

kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], "");

This problem also occurs when using Panes.

Change History (5)

comment:1 Changed 16 years ago by dylan

Milestone: 0.4

comment:2 Changed 15 years ago by dylan

Component: GeneralIO
Owner: changed from anonymous to alex

comment:3 Changed 15 years ago by James Burke

Owner: changed from alex to James Burke

Stealing io and package bugs from Alex. Holler if you want it back.

comment:4 Changed 15 years ago by James Burke

Resolution: wontfix
Status: newclosed

The "bindEncoding" and "encoding" params mentioned in Dojo above are for helping construct the request to the server, but do not deal with the response. AFAIK, we do not have control over the charset of the response, and XMLHttpRequest assumes UTF-8. Closing this as wontfix, because we cannot fix it. The server needs to send the right charset in the HTTP response headers.

Another reference:

comment:5 Changed 15 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.