473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

traping curly apostrophes

Sometimes I have a user who will copy and paste something from Word and it
includes a curly variation of an apostrophe. When this text is displayed
back to the user at a later date (after pulling from the SQL Server DBMS) it
is interpreted as "?" instead.

I would like to replace the curly ones with the normal one, but I have not
had luck with the replace function itself.

Any ideas?
Thanks in advance,

Ryan
Jun 14 '06 #1
4 1462
Hi Ryan,

Thank you for posting here.

From your description, I understand that in one of your ASP.NET web page,
the user will input some text data and submit them to store in the
database, and these data will be displayed again on the webform later.
However, you found that there are some particular characters which will be
displayed as "????" after retrieved from database and display them again,
correct?

Based on my experience, this is likely a charset conversion issue, and "?"
sign indicates that the charset used in the conversion can not identify the
original character , so it use "?" to replace it. Generally for such issue,
there are three steps to can troubleshoot and isolate on this issue:

1. Check in the database after the user input has been stored in database.
This helps ensure whether the characters remain correct in the database
(from the input page).

2. In the display page, you can set breakpoint in the page code and lookup
the string data retrieved from database to see whether the text got from
database is still the correct characters.

3. Finally, even if the data in ASP.NET page's runtime memory(as Unicode
chars) is correct, after the page resposne encoding the data and flush out,
the charset of the response should match the client browser's encoding
setting, otherwise, the browser still can not correctly display these chars.

You can trace the text through the above ways. If you feel anything unclear
or meet any further dificulties, please feel free to post here.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Jun 15 '06 #2
I think that these are the unicode characters that you are looking for:

Single quotation marks: 2018, 1029
Dobule quotation marks: 201C, 201D

http://www.microsoft.com/typography/...sspec/punc.htm

Unless the database field is a unicode field (ntext), it won't be able
to store those unicode characters. Then you have to replace them before
you store the text in the database.
Ryan wrote:
Sometimes I have a user who will copy and paste something from Word and it
includes a curly variation of an apostrophe. When this text is displayed
back to the user at a later date (after pulling from the SQL Server DBMS) it
is interpreted as "?" instead.

I would like to replace the curly ones with the normal one, but I have not
had luck with the replace function itself.

Any ideas?
Thanks in advance,

Ryan

Jun 15 '06 #3
Thanks to you both, I will have a look and see if that helps.
--
Ryan
"Göran Andersson" wrote:
I think that these are the unicode characters that you are looking for:

Single quotation marks: 2018, 1029
Dobule quotation marks: 201C, 201D

http://www.microsoft.com/typography/...sspec/punc.htm

Unless the database field is a unicode field (ntext), it won't be able
to store those unicode characters. Then you have to replace them before
you store the text in the database.
Ryan wrote:
Sometimes I have a user who will copy and paste something from Word and it
includes a curly variation of an apostrophe. When this text is displayed
back to the user at a later date (after pulling from the SQL Server DBMS) it
is interpreted as "?" instead.

I would like to replace the curly ones with the normal one, but I have not
had luck with the replace function itself.

Any ideas?
Thanks in advance,

Ryan

Jun 15 '06 #4
Sure Ryan,

Please feel free to post here when you got any progress or still need any
assistance.

Regards,

Steven Cheng
Microsoft MSDN Online Support Lead
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jun 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: deko | last post by:
Do I need to use curly brackets in PHP if .. else statements? other constructs? Does it matter? What are Best Practices? Why? thanks in advance... This seems to work WITHOUT curly brackets:...
8
by: Ken in Melbourne Australia | last post by:
If I use the curly bracket syntax (referred to as the complex syntax) within a string, how do I get to call a function within it? The php manual says that the first (or previous) character for...
2
by: Ken Fine | last post by:
I'm using XMLHTTP to screen-scrape many thousands of pages of content as part of a data-structuring project. One issue that I'm running into is that some entities such as curly quotes and curly...
8
by: Joe Van Meer | last post by:
Hi all, Been a while since I've done any asp coding, but happy to be getting back into it. My question is what is the best way (now) to handle apostrophes coming in from forms and going into...
6
by: STF | last post by:
While reading the C++ tutorial in this page: http://www.cplusplus.com/doc/tutorial/tut2-2.html I'm astonished to learn that we could omit curly brackets in function declaration for single...
3
by: James Foreman | last post by:
I've got a set of emails in a table, where sometimes they've failed to input the @ properly. Eg james.foreman'abcmail.co.uk How do I write a replace to deal with that? Also, I've got a set...
3
by: Richard Hollenbeck | last post by:
I have an email field and a command button to send email. The problem is that when the email program opens up there are apostrophes around the email address that I have to manually remove before...
23
by: Haines Brown | last post by:
I tried changing font-family from helvetica to arial and discovered that I loose typographic quotes, etc. (for example, if I have “ in a page, the double opening quotation mark is not curly). ...
4
by: Lucanos | last post by:
Hey Guys, Probably a simple question, but one I am struggling with all the same. I know that in PHP you wrap a text string in apostrophes or quotations - (examples $variable = 'this string' OR...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.