473,238 Members | 1,834 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,238 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 2124
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...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.