Solved

£ lost from text in SQL database / VB script site

Posted on 2011-09-10
6
276 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 28

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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