Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Where is the <%@ string located?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Where is the <%@ string located?

 Post Reply Post Reply
Author
Mattias Nordin View Drop Down
Groupie
Groupie


Joined: 30 March 2005
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mattias Nordin Quote  Post ReplyReply Direct Link To This Post Topic: Where is the <%@ string located?
    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
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: 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.
Back to Top
Mattias Nordin View Drop Down
Groupie
Groupie


Joined: 30 March 2005
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mattias Nordin Quote  Post ReplyReply Direct Link To This Post 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?

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

Back to Top
Mattias Nordin View Drop Down
Groupie
Groupie


Joined: 30 March 2005
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mattias Nordin Quote  Post ReplyReply Direct Link To This Post 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 %>
 
 
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. :) 


Edited by Mattias Nordin - 07 April 2009 at 11:30am
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: 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.
Back to Top
Mattias Nordin View Drop Down
Groupie
Groupie


Joined: 30 March 2005
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mattias Nordin Quote  Post ReplyReply Direct Link To This Post 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".
 
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: 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.
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.