View Full Version : update manager and character set

26 Feb 2007, 12:08 PM
i couldn't get turkish character set from update manager's response text. i'm using iso-8859-9 charset.
i'm updating with this code:

var newtab= new Ext.ContentPanel('content',{title: 'Genel', fitToFrame:true, closable:false});
var updater = newtab.getUpdateManager();
updater.loadScripts = true;

Response Headers
Server Microsoft-IIS/5.1
X-Powered-By ASP.NET
Date Mon, 26 Feb 2007 19:12:54 GMT
Content-Type text/html
Accept-Ranges bytes
Last-Modified Mon, 26 Feb 2007 16:30:33 GMT
Etag "b0c2a70c359c71:a4a"
Content-Length 352

Request Headers
Host localhost
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv: Gecko/20061204 Firefox/
Accept application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language tr-TR,tr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-9,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Referer http://localhost/taslak/index.html
Cookie dbx-postmeta=grabit=0-,1-,2-,3-,4-,5-,6-&advancedstuff=0-,1-,2-; phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bi%3A-1%3B%7D
If-Modified-Since Mon, 26 Feb 2007 16:30:33 GMT
If-None-Match "b0c2a70c359c71:a4a"
Cache-Control max-age=0

26 Feb 2007, 11:45 PM
i'm still waiting for a response... can anybody show me what am i missing pls

27 Feb 2007, 12:40 AM
This is a server-side issue.

It's up to you to ensure that, on the server side, you encode the character data into bytes using a certain encoding, and then inform the browser that that was the encoding used in the "Content-Type" header:

Content-Type text/html;charset=<whatever character encoding you used>

27 Feb 2007, 12:53 AM
hi animal,
i'm requesting a page with no headers like this tab.html

<div id ="container" style="padding:2px">
Genel Başlık</div>

i tried to change response header of update manager and finally do this and it worked ok. but do you have any idea how to make this solution out of yui core...i've added overridemimetype before send
connection.js line 331 (in package alpha 2 rev 5)

o.conn.overrideMimeType('text/html; charset=iso-8859-9');
o.conn.send(postData || null);

27 Feb 2007, 1:04 AM
hi again
i found a solution with the code below:

updater.transaction.conn.overrideMimeType('text/html; charset=iso-8859-9');

27 Feb 2007, 1:32 AM
That's fine if your server will always use iso-8859-9

Use the Content-Type header for the purpose for which it was designed! Set the charset element to the encoding scheme that the server is using.

Again: this is a server-side issue that you must take care of in your ASP script

27 Feb 2007, 6:50 AM
thanx for your reply animal. can u pls give me a simple example asp script for sending content containing turkish characters.
like this
response.write "şığüçö"

27 Feb 2007, 6:59 AM
ok i found it finally..i was missing a simple line