Print Page | Close Window

Where is the <%@ string located?

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=27227
Printed Date: 02 April 2026 at 7:08pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Where is the <%@ string located?
Posted By: Mattias Nordin
Subject: Where is the <%@ string located?
Date Posted: 07 April 2009 at 10:09am
I am having troubles with swedish characters on my website and i have added the following to the header of every webpage (except the forum).
 

<%@ CodePage=65001 Language="VBScript" LCID=1053%>
 
Where can i add this to the forum?
 
Without the codepage this forum looks like this
 
Quote
Topic: Vad är din bästa Barrel Race tid?
 
The problem is that i use another script on another webpage to pull out the 10 latest post and that include shows the following since that page use another codepage (i guess thats the reason anyway)
 
Quote
Vad är din bästa Barrel Race tid?
 
So my guess is that everything will be solved if i can add the string <%@ CodePage=65001 Language="VBScript" LCID=1053%> to all the forum pages. Where can i do that?
 
Thank you for your support. Star



Replies:
Posted By: WebWiz-Bruce
Date Posted: 07 April 2009 at 10:18am
You can add this in the common.asp file.

However, you should look at changing the page encoding in the includes/setup_options_inc.asp file to one that supports your character set.


-------------
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: Mattias Nordin
Date Posted: 07 April 2009 at 11:03am
Thank you.
 
I have struggled a LOT with all kind of UTF-8 encodings and the error source has just moved around. To get all functionality to use the same encoding the <%@ code page seems to be the only solution.
 
If i try to add <%@ CodePage=65001 Language="VBScript" LCID=1053%> to common.asp i get the following error:
 
Quote
 Active Server Pages error 'ASP 0141'

Page Command Repeated

/forum/common.asp, line 2

The @ command can only be used once within the Active Server Page.

Seems like the @ tagg is used somewhere else. It did not exist in the common.asp file. The question is where?



Posted By: WebWiz-Bruce
Date Posted: 07 April 2009 at 11:07am
The @ command needs to be at the top of the file, so would need to be included in every page. Where you have the following:-

<% @ Language=VBScript %>

However, I would try first just changing the LCID in the common.asp file as this changes the locale for the ASP page including the encoding as set for that locale on the server. The page below gives more details and LCID numbers for different locales:-

http://www.webwiz.net/kb/asp_knowledgebase/date_time_settings.asp" rel="nofollow - http://www.webwiz.net/kb/asp_knowledgebase/date_time_settings.asp



-------------
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: Mattias Nordin
Date Posted: 07 April 2009 at 11:23am
If i understand it correctly lcid only set the syntax type of dates etc. It has nothing to do with character encoding. What is important for me is the codepage part.
 
<%@ CodePage=65001 %>
 
http://www.asp-dev.com/main.asp?page=96" rel="nofollow - http://www.asp-dev.com/main.asp?page=96
 
Perhaps the webserver is misconfigured since for example the Vbscript function :
<%=WeekdayName(WeekDay(now))%>
 
would return...
Quote m�ndag
 
But if i add the CodePage=65001 to the ASP pages everything works fine.
 
So my question is still where can i add the string <%@ codepage...> on your forum. It feels like you have that @ - tag on some of your pages allready. I get the error message due to that.  I would put it on the header page but it is not found in the header.asp file in the includes folder. What would be your top include file?
 
Thanks. :) 


Posted By: WebWiz-Bruce
Date Posted: 07 April 2009 at 12:10pm
Originally posted by WebWiz-Bruce WebWiz-Bruce wrote:

The @ command needs to be at the top of the file, so would need to be included in every page. Where you have the following:-

<% @ Language=VBScript %>



Unfortunately the @ command needs to be the first command in the file so would need to be placed on everything single file, which will take quite a while to do. If you have something like UltraEdit then you can do a global search and replace.

However, we have many people using our software in other languages such as Swedish and never had to have anyone set the encoding in this way.

Just change the page encoding in the includes/setup_options_in.asp file. Anything already saved will be in the old encoding including the dates, but to change this just edit the dates in the online control panel and save them back in the new page encoding to fix the charcter issue in your dates.


-------------
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: Mattias Nordin
Date Posted: 07 April 2009 at 1:20pm
Phew... i was hoping that you had an header include file that would be the only place where i would add that. This seems to be to much work.
 
I guess the alternetive is to find out how to fix the IIS webserver to allways use UTF-8. But i have allready spent some time searching for a solution on that and still havent found any helpful info.

Any ideas?
 
The problem is easiest to find when i try to use the following function:
 
Originally posted by Mattias Nordin Mattias Nordin wrote:

<%=WeekdayName(WeekDay(now))%>
 
would return...
Quote m�ndag
 
It needs to return "Måndag".
 


Posted By: WebWiz-Bruce
Date Posted: 07 April 2009 at 1:27pm
The @ command can not be used in an include, which is why you need to place it at the top of every file.

The function you use an example is not used in Web Wiz Forums, it gets the dates from the database which you set from the admin area.

As I mentioned previously allot of Swedish forums use our software and only need to change the page encoding in the includes/setup_options_inc.asp file. You then just need to resave the date and time settings in your forums admin area to have them saved in the correct ending in the database.


-------------
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



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