473,327 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

option explicit error with utf-8

1
I get an option explicit error saying it does not appear as the first line whenever I use it with utf-8 charset encoding on my Sun Cobalt server running Chillisoft on Linux.

The error does not occur if the charset declaration in the metatag is 8859-1 but this causes spurious characters such as capital A with a circle over it to appear before the "£" symbol when newsfeeds are paced on the 8859-1 page. Not very professional!

These was a known MS bug in IIS on unicode pages becasue it places a BOM character at the beginning of the file - hence tripping the option explicit error. Does anyone have a fix for this other than omitting option explicit altogether.

code examples:

Error example

[code] <%@Language="VBSCRIPT CODEPAGE="1252"%>[code]
[code]<%OPTION EXPLICIT%>[code]
[code]<%code...%>[code]

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[code]
[code]<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">[code]
[code]<head>[code]
[code]<title>some title</title>[code]
[code]<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[code]

OK example

ditto above but different metatag
[code]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />[code]

Note: I use DWMX for coding and this places a unicode signature (BOM) on the file using Canonical Decomposition, followed by Caninical Composition (class C) as this is the recommended way to employ unicoded pages. If I omit this BOM char the page works with utf-8 but is this going to cause browser issues?
May 31 '07 #1
1 2129
praveen2gupta
201 100+
I get an option explicit error saying it does not appear as the first line whenever I use it with utf-8 charset encoding on my Sun Cobalt server running Chillisoft on Linux.

The error does not occur if the charset declaration in the metatag is 8859-1 but this causes spurious characters such as capital A with a circle over it to appear before the "£" symbol when newsfeeds are paced on the 8859-1 page. Not very professional!

These was a known MS bug in IIS on unicode pages becasue it places a BOM character at the beginning of the file - hence tripping the option explicit error. Does anyone have a fix for this other than omitting option explicit altogether.

code examples:

Error example

[code] <%@Language="VBSCRIPT CODEPAGE="1252"%>[code]
[code]<%OPTION EXPLICIT%>[code]
[code]<%code...%>[code]

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[code]
[code]<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">[code]
[code]<head>[code]
[code]<title>some title</title>[code]
[code]<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[code]

OK example

ditto above but different metatag
[code]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />[code]

Note: I use DWMX for coding and this places a unicode signature (BOM) on the file using Canonical Decomposition, followed by Caninical Composition (class C) as this is the recommended way to employ unicoded pages. If I omit this BOM char the page works with utf-8 but is this going to cause browser issues?
Try following sequence It may solve your problem in UTF-8 . I am working on utf-8 with diffreent technology.

Expand|Select|Wrap|Line Numbers
  1. <html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title></title>
  2.  
  3. write your codes after the above sequence 
  4.  
Jun 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: biro man | last post by:
I have a dynamic database driven page that I have been working on and tweaking etc until I have got it to work pretty much the way I want it to. I also have a defined website. I wish to include...
1
by: Robert Mark Bram | last post by:
Hi All! I have the following in a vb script: option explicit Response.Expires = -1 Server.ScriptTimeout = 600 The script gets imported in the following way: <script language="VBscript"...
7
by: Mats | last post by:
Option Explicit does not work anymore.(?) If you put <%option explicit%> at the top of your pages (direktly after the language declaration) you should get an error for each undeclared variable....
5
by: Agoston Bejo | last post by:
I am generating WML pages from ASP. I have header.inc that looks like this: ---------------------------------------------- <%@Language=VBScript%><% Option Explicit Response.Buffer = True...
5
by: John | last post by:
Hi I am getting conversion errors in the below code on the lines highlighted in red. Would appreciate any tips on how to fix these errors. Thanks Regards
5
by: ken | last post by:
hi All What does this command dot Option Explicit
9
by: YYZ | last post by:
After reading many messages in this group, it seems that the preferred setting for this is ON. Okay, I did that in my project (first with ..Net -- long time VB6 developer) and now a bunch of...
6
by: John Kotuby | last post by:
Hi all, I am simply trying to include the Option Explicit declaration at the top of an ASP page and am getting an error: Error Type: Microsoft VBScript compilation (0x800A0400) Expected...
4
by: John | last post by:
Hi I have a vs 2003 project which I have just imported into vs 2005. Now I am getting the "Option Strict On disallows operands of type Object for operator '='. Use the 'Is' operator to test for...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.