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
https://forums.phpfreaks.com/topic/159572-iso-entity-names-apostophes/
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 ?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.