472,127 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 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 2086
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

Post your reply

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

Similar topics

8 posts views Thread by biro man | last post: by
1 post views Thread by Robert Mark Bram | last post: by
7 posts views Thread by Mats | last post: by
9 posts views Thread by YYZ | last post: by
4 posts views Thread by John | last post: by
reply views Thread by leo001 | last post: by

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.