Apostrophe " ' " shows as a "?" or sometimes a square box- is this a font or character set issue

I can not get apostrophe's to  display correctly in a web page I am building.

The text starts out on another web site.  I read the file and save chunks of it in a database.  Then later I spit that out into a web page.

The somewhere in that process I lose the apostrophe and usually get nothing in that space, or if I fiddle with char-sets I can get a "?" or the symbol for a box.

For example the work   customer's  will show up as just customers

Can someone explain this to me me?  

I need to get the apostrophe to show up in my final web page.

thanks

mike
bigmikey88Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HighTechGeekCommented:
Many font sets contain a variety of apostrophe and quote symbols. Besides the standard straight apostrophe and straight quotes, there are left and right quotes and slanted apostrophes. Many Windows apps are set by default to replace straight quotes and apostrophes with "smart quotes", etc.

the best way to fix it is to paste the text into a text editor and replace the changed quotes with a normal apostrophe and then use that text on your web site to ensure you are using the normal straight apostrophe.
0
bigmikey88Author Commented:


I have to do this programatically, since this is being done to 300 web pages all automatically.

any advice?
0
HighTechGeekCommented:
The smart quotes should be a known Unicode number. If you can take a couple of the ? or box characters and figure out which Unicode numbers they are, you should be able to programmatically do a search and replace for the regular symbol.

for example, U+2018 through U+201F are various Unicode slanted apostrophes and quotes that could be replaced with the standard apostrophe (U+0027) and double quote (U+0022).

See a partial Unicode table here:
http://en.wikibooks.org/wiki/Windows_Programming/Unicode/Character_reference/2000-2FFF

also, in Windows, the "Character Map" tool is useful. Go to Start\Programs\Accessories\System Tools\Character Map

You may not even need to know the Unicode. You could copy the ? or box character and paste it into code that searches for that character. Then replace it with a regular apostrophe or quote that you have typed in a text editor. I do that in Word documents with the Find and Replace feature.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bigmikey88Author Commented:
Hey HTG,

Thanks for the info on Unicode.

I actually went off in another direction, but since you took the time to help and I did learn something useful, I'd like to award you the points.

Turns out that if I specify the character set  ISO-8859-1 whenever I read or write these files, the characters come out OK.  That was the fix.

Thx for helping

0
HighTechGeekCommented:
I appreciate it! I'm glad you were able to get the problem resolved. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.