Print Page | Close Window

AJAX and non-latin characters

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=27785
Printed Date: 02 April 2026 at 9:26am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: AJAX and non-latin characters
Posted By: yandr
Subject: AJAX and non-latin characters
Date 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" />




Replies:
Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: yandr
Date 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.


Posted By: yandr
Date 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.








Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net