/    Sign up×
Community /Pin to ProfileBookmark

Extended characters in AJAX response

Hi,

I am reading one .htm page using XMLHTTP and printing it onto some another page. Page is being read properly but issue is with display.

htm page I am reading contains extended characters like ‘ , “ , ’ , ” , µ , etc. which are being displayed as �in firefox and square boxes in IE.

The actual page I am reading is : [url]http://bulletlink-e5.com/article.htm[/url]

and the page which reads above page using AJAX and displays is : [url]http://bulletlink-e5.com/d.htm[/url]

Please let me know how to fix this issue.

Thanks in advance.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@KorFeb 03.2011 — Use UTF-8 both in DB and in meta characters of your web document. Use the UTF-8 encoder method of your server-side language (PHP, ASP, etc...).
Copy linkTweet thisAlerts:
@abhijeet_digheauthorFeb 03.2011 — Hi,

Thanks for your reply. But its a static .htm file now. There is no connection with database. I am just reading these static .htm files using AJAX.

You can see static file: http://bulletlink-e5.com/article.htm

and file which reads above page: http://bulletlink-e5.com/d.htm
Copy linkTweet thisAlerts:
@KorFeb 03.2011 — Both your documents have charset iso-8859-1. make them UTF-8
<i>
</i>&lt;meta http-equiv="Content-Type" content="text/html; charset=[COLOR="Blue"]utf-8[/COLOR]" /&gt;

But... Your code works a little bit illegal, as it writes on the body of a document some parts of the other document (like meta tags) which normally stay in the HEAD, not in the body.
×

Success!

Help @abhijeet_dighe spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...