473,800 Members | 2,726 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1483
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
12961
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: if(ereg("Win", getenv("HTTP_USER_AGENT"))) $visos = "Windows"; elseif((ereg("Mac", getenv("HTTP_USER_AGENT"))) || (ereg("PPC",
8
6842
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 the curly bracket has to be a dollar sign '$'. This is fine for variables, arrays and some objects but doesn't allow me to call a function such as addslashes() or trim() before I return the string in the variable.
2
1803
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 apostrophes do not translate properly; they're returned as question marks indicating an unidentified character. I'm guessing the usual hack of writing a translate function doesn't work since the problem lies in the data being pulled down by...
8
2007
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 the database? I remember I used to use a replace function replacing single quotes with two single quotes in one of my old apps. Is this still the best way, use this function on all fields I think an apostrophe may come in, or on all fields? Or...
6
6670
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 instruction as is written in the paragraph: "statement is the function's body. It can be a single instruction or a block of instructions. In the latter case it must be delimited by curly brackets {}." But I'm not sure if this is true. At least with...
3
9835
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 of names in a table, all in lower case. I can easily capitalise the first letter of each name, but if it's somebody like O'Brien, I'd like to get that right too (so need to be able to
3
2769
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 sending the email. My code is very simple. I can't understand why the apostrophes are put there but the addresses won't work until they are stipped of the apostrophes. Here's my code: Private Sub cmdEmail_Click() If len(txtEmail) > 0 Then
23
5814
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). The reason for trying arial was that I understood it was easier reading, although I still find helvetica easier (what is the consensus, if any, on this issue?). I suspect that arial uses Microsoft's 1252 code page and so does not make “...
4
18506
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 $variable = "that string" ). What I am trying to figure is how to handle a string which contains both apostrophes and quotations already. Is there a something like CDATA is for XML?
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10279
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.