Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2006, 01:15 PM
Authorized User
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Losing special character data

I have an ASP ADO recordstat that is querying my sql server database. The lastname it needs to retrieve is "Banos" with the "n" being the n with a tilde special latin character.

However once my recordset grabs it using objRS("name"), the name is truncated to return "Ba" though actually is #55728;#56466;>o when I print out the last 3 characters using Mid. Why are the remaining characters getting trashed?

Melissa Mussitsch
 
Old September 5th, 2006, 01:33 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

When you run the query in Query Analyzer, is the name returned correctly or is it trashed there as well?

"The one language all programmers understand is profanity."
 
Old September 5th, 2006, 01:44 PM
Authorized User
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The name is displayed correctly in Query Analyzer.
I have discovered that the value is being returned as Ba and then 3 garbage characters when displayed in HTML. If I search for the ñ
character and replace it with ñ it will display in HTML. There are so many special characters however. Isn't there an easier way around searching for every possible special character in a latin or german name?

Thanks.
Melissa
 
Old September 5th, 2006, 02:08 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Hmm, not that I know of. When I insert data into SQL Server, I have a special function that I wrote that looks for special characters and either replaces them with their HTML equivelant, or removes them entirely depending on the character.

What you *might* be able to do is create a similar function then run the results of your query through that function to replace all of your special characters.

Sorry that I can not be of more help.

"The one language all programmers understand is profanity."
 
Old September 5th, 2006, 02:29 PM
Authorized User
 
Join Date: Jun 2003
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That's what I was afraid of.

But thank you!
Melissa





Similar Threads
Thread Thread Starter Forum Replies Last Post
Special Character issue in JSP Janardhana M Pro JSP 8 July 12th, 2006 11:21 PM
Validation for special character nazneen Java GUI 5 February 13th, 2006 03:13 PM
Special Character mg1966 Classic ASP Databases 2 December 13th, 2004 11:12 AM
finding the string before a special character srini XSLT 2 December 16th, 2003 07:57 AM
HELP!!! the problem of handling special character kemin Classic ASP Databases 1 December 13th, 2003 01:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.