Jump to content

ISO entity names - apostophes...


Goafer

Recommended Posts

Hi,

It's been a while since I have done any web design, and i'm currently knocking up a fairly basic site for a friend with minimal php etc.

Since it's been a while, i'm trying hard to be quite clean with the coding and am taking care to use entity names where appropriate i.e. & instead of &.

I'm really just wondering why ' doesn't work in IE, and as such, is it better to use ' or '.

What is the difference in terms of compatibility etc?

 

any knowledge greatly appreciated.

 

Many Thanks,

 

Chip(Goafer)

 

 

Link to comment
Share on other sites

' is a xml/xhtml entities only, html doesn't have a entities for apos

 

If you are using html you don't need to make a entity of the '/apos isn't needed at all no mater what charset you are using since aposthrophe is in the first 0-127 character(ASCII), if you are using xml you must (i think it's a must for xhtml too but i'm not sure as i don't know every detail of it).

 

If you are using it in a URL you must encode it for both html and xhtml with rawurlencode()

http://www.php.net/manual/en/function.rawurlencode.php

 

What IE version are you using ? Did you use html or xhtml ?

Link to comment
Share on other sites

it's IE 7.  I originally did use ' as I thought that was OK, however Google Chrome didn't recognise the ' and put in it's own little symbol for "what the hell is that" so I started using ' to overcome the situation before finding out that IE doesn't support '  So now i've got ' which seems to work in IE & Chrome & Firefox.

I think it's just that Google have thrown things off a bit with the new browser.

In answer to your question: yes, it's an XHTML document using standard charset iso-8859-1

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.