ASP VBScript insert / Update and £ sign

G

GTN170777

Hi guys,

Your expertise would be so appreciated on this one, I'm using CS3 and MS SQL
server,

There is a field where a user may need to enter the pound sign, for instance
"£24,000 per annum plus benefits" etc

The problem is that somewhere during the insert update it changes the £
pound sign to either a #hash or it inserts the value without the £pound
sign...

The page lauguage is -

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

the details in the head section are

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="../Scripts/currentdate.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The SQL Collation is SQL_Latin1_General_CP1_CI_AS

I'm kind of at a loss as to what the problem is with the £ pound sign??

Is there maybe a way or catching and changing the £ sign before insert or
update??

PLEASE -- PLEASE help

thanks
 
A

Anthony Jones

GTN170777 said:
Hi guys,

Your expertise would be so appreciated on this one, I'm using CS3 and MS SQL
server,

There is a field where a user may need to enter the pound sign, for instance
"£24,000 per annum plus benefits" etc

The problem is that somewhere during the insert update it changes the £
pound sign to either a #hash or it inserts the value without the £pound
sign...

The page lauguage is -

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

the details in the head section are

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="../Scripts/currentdate.js"></script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The SQL Collation is SQL_Latin1_General_CP1_CI_AS

I'm kind of at a loss as to what the problem is with the £ pound sign??

Is there maybe a way or catching and changing the £ sign before insert or
update??

PLEASE -- PLEASE help

I take it this page contains a form. Does it post back to this same page or
does the form action point elsewhere.

The page seems confused as to its character encoding. The codepage says
65001 which is UTF-8 whereas you have a meta content-type specifying
ISO-8869-1.

You should ensure that both the Form page and the page pointed at by the
action attribute both use the same codepage and that the charset in the
content type header matches the codepage encoding.
 
G

GTN170777

Thanks Anthony - spot on.

G

Anthony Jones said:
I take it this page contains a form. Does it post back to this same page or
does the form action point elsewhere.

The page seems confused as to its character encoding. The codepage says
65001 which is UTF-8 whereas you have a meta content-type specifying
ISO-8869-1.

You should ensure that both the Form page and the page pointed at by the
action attribute both use the same codepage and that the charset in the
content type header matches the codepage encoding.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top