View Full Version : Problem - (’)

02-15-2012, 11:56 AM

Im trying to add some text to my new site but i keep getting this problem.

' turns into ’
- turns into –

My encoding is: UTF-8

Can anyone help me out?


02-15-2012, 12:04 PM
My encoding is: UTF-8
What you meant by that?

02-15-2012, 12:43 PM
Just change your encoding to Unicode or ANSCII

02-15-2012, 02:11 PM
Sidenote: Dashes in HTML can cause unexpected commenting under the right (or wrong, depending on your point of view) circumstances. I generally recommend encoding those using – rather than the explicit "-" character to be safe.

Now this doesn't fix the specific problem you are facing, but I believe your problem is probably due to copy/pasting from a rich text editor (such as MSWord) and using that in your source code. Rich text editors can and often do use non-standard characters (non-standard for unicode, that is) for dashes. They will often change a simpel dash to a "long" dash if used with spaces between words and apostrophes (often inserting a right-slanted apostrophe for contractions, or left and right apostrophes for quotations - more to come on that). Any of these non-standard characters written directly into the HTML will cause a browser to display what you are seeing.

Likewise, the apostrophe itself should be working fine unless you, for example, copied and pasted from MSWord - in which case the default Word settings have probably given you a slightly slanted apostrophe which is non-standard for unicode. If you want to keep it right-slanted as it appeared in your rich text editor, you can encode it in roughly the same way as you would your dash, using ’. Otherwise, if you really only want an apostrophe and you aren't trying to maintain the precise appearance of your rich text editor (which I am still presuming you have used) then just open up your source code, delete the existing apostrophe character(s), and re-type fresh ones directly from your keyboard.