:: Forum >>

Problem with response's character set....

Ok.... AW version 2.0.2 (looking forward to 2.5!!)

I have a simple function:
function loadFromFile(filename){
var req = new AW.HTTP.Request;
req.answer = "";
req.setURL(filename);
req.setAsync(false);
req.request();
return req.getResponseText();
}


This is used to load an external HTML file and I later put it where it should go inside a div. Everything works great. BUT... this external file has a few trademark characters in it... Unicode 2122 (Alt+0153 in windows) ™ ... you know.. the trademark character.

Anyway, the trademark character is displayed as ? marks for some reason.... but if I display the file directly.... the trademark symbol is there. So I know that my FTP is using binary to transfer the file, the character is capable of displaying with the current font... and in fact all the copyright symbols STILL show up.

Is there a character set flag or anything with an HTTP request? It seems that the only place where it isn't working is when i do the HTTP request. Again... the copyright symbol works well.... and the trademark symbol works every other time... but not when I do it through the http request.

Alex... any ideas?
John Mason
Thursday, November 8, 2007
okay, okay... I changed all my trademark characters into ™ symbols.

But it WOULD be nice to know the answer to my question...
John Mason
Thursday, November 8, 2007
As far as I remember XMLHttpRequest object works only with UTF-8 encoding, so your file must be in UTF-8 if you load it with AW.Http.Request class.
Alex (ActiveWidgets)
Monday, November 12, 2007

This topic is archived.


Back to support forum

Forum search