traping curly apostrophes

G

Guest

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
 
S

Steven Cheng[MSFT]

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.)
 
S

Steven Cheng[MSFT]

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.)
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top