Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - AJAX and non-latin characters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AJAX and non-latin characters

 Post Reply Post Reply
Author
yandr View Drop Down
Groupie
Groupie


Joined: 10 March 2009
Status: Offline
Points: 106
Post Options Post Options   Thanks (0) Thanks(0)   Quote yandr Quote  Post ReplyReply Direct Link To This Post Topic: AJAX and non-latin characters
    Posted: 03 September 2009 at 6:11pm
Since the Calendar, Email notification and Newspad feed uses AJAX to load, there seems to be a problem with non-latin characters not displaying correctly (Greek characters to be exact).

Any quick fixes for this error?

I tried the following, to no avail.

<% @ LANGUAGE=VBScript CODEPAGE=1253 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1253" />

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2009 at 7:38am
Not really sure where you are entering this code as web wiz forums has now where to enter this type of code in this format.

If you want to change the page encoding then you need to edit in notepad the file includes/setup_options_inc.asp and change the encoding near the bottom of the file.

When you change the encoding all previous data would have been saved under the old encoding so mnay not display correctly unless it is re-saved under the new encoding.
Back to Top
yandr View Drop Down
Groupie
Groupie


Joined: 10 March 2009
Status: Offline
Points: 106
Post Options Post Options   Thanks (0) Thanks(0)   Quote yandr Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2009 at 4:58pm
I put the code in the ajax_[something] file.

setup_options_inc.asp alone will not cut it I am afraid.
Back to Top
yandr View Drop Down
Groupie
Groupie


Joined: 10 March 2009
Status: Offline
Points: 106
Post Options Post Options   Thanks (0) Thanks(0)   Quote yandr Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2009 at 5:18pm
Found the solution ....

You need to HTMLencode the text response. In other words, ajax_email_notify.asp should read

Response.Write("<a href=""email_notify.asp?TID=" & lngTopicID & "&PN=" & lngTotalRecordsPages & strQsSID2 & """><div>" & Server.HTMLEncode(strTxtWatchThisTopic) & "</div></a>")

The bold stuff must be added in all for cases of response, same with the calendar. But just the text, not the HTML tags. In the calendar's case, it is a tiny bit more difficult because the actual subs are in the functions_calendar.asp file. Since the displaymonth sub is called from ajax and non-ajax files, the response should be encoded in the first case but not in the second.

So, you either need a separate function (ajax_displaymonth) or add a boolean parameter to check if you need to encode or not.

You may want to include this in a future version to help users using non-latin alphabets.







Edited by yandr - 06 September 2009 at 12:09am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.