Solved

£ lost from text in SQL database / VB script site

Posted on 2011-09-10
6
277 Views
Last Modified: 2012-05-12
Hi All,

I have a textarea that contains booking notes. Sometimes it may contain £ characters - e.g. "Customer paid £100 deposit".

When I save the contents of the textarea to the database the £ characters are lost, and I can't figure out why.

The charset of the page is utf-8, and the vbscript codepage is set to 65001.

Does anyone have any idea why this could be happening? Any further information needed please ask.

Thanks,

Dan
0
Comment
Question by:stressfreewebs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 29

Expert Comment

by:sammySeltzer
ID: 36516318
0
 

Author Comment

by:stressfreewebs
ID: 36516350
Hi Sammy,

I've used format currency before, but only on numeric data. This is text data, so I don't understand how it applies here?

For example, take the string "Discussed discount with custmer - offerred £20 off" - if I saved that, the £ symbol would be lost, but I can't use formatcurrency with that string as it would error, and in any case would not return the result desired if it did work.

Or am I looking at the wrong part of that article?

Thanks for your help,

Dan
0
 
LVL 12

Accepted Solution

by:
Wouter Boevink earned 500 total points
ID: 36516393
I'm not sure but maybe it gets lost in the database, what type of field are you using varchar, text or nvarchar, ntext.
The "N" in NVARCHAR means uNicode,  but I don't now if the pound sign is a standard or an unicode character.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 11

Expert Comment

by:tobzzz
ID: 36516677
Does your page contain <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> in the <head> tags?

Is the page saved as UTF-8 format? (check by opening and saving-as in something simple like Windows Notepad).

When you say lost, do you mean it's changing it to something else or literally disappearing?

/ Tobzzz
0
 

Author Comment

by:stressfreewebs
ID: 36516743
Hi tobzzz,

Yes it is in utf-8, and the symbol is literally disappearing...I'm going to look into the data type on the server mentioned above but can't do it until wed next week...will update if that's the solution :)

Thanks everyone, dan
0
 

Author Closing Comment

by:stressfreewebs
ID: 36516758
I managed to get on sooner than next week - and yipee it worked!

I never knew that...it now makes sense why I've had similar problems before with various symbols in that field type!

Thanks everyone, great :)
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question