Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Problem - (’)

  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem - (’)

    Hey

    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?

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,854
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    My encoding is: UTF-8
    What you meant by that?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Feb 2012
    Location
    England
    Posts
    77
    Thanks
    0
    Thanked 12 Times in 11 Posts
    Just change your encoding to Unicode or ANSCII

  • #4
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    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.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •