RE: [WSG] Entity Name vs Entity Number
You could also read this: http://www.w3.org/International/questions/qa-escapes/ It contains much of the same advice in Lachlan's article, but a little more about when and when not to use escapes vs characters. RI Richard IshidaInternationalization LeadW3C (World Wide Web Consortium)http://www.w3.org/People/Ishida/http://www.w3.org/International/http://people.w3.org/rishida/blog/http://www.flickr.com/photos/ishida/ From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of James OppenheimSent: 19 October 2006 03:16To: WebStandardsGroup WebStandardsGroupSubject: [WSG] Entity Name vs Entity Number Hello all,A quick question. When marking up XHTML should I be using entity names or entity numbers? Is there a standard or best practice? Be one of the first to try Windows Live Mail. ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]*** ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]***
Re: [WSG] Entity Name vs Entity Number
> James Oppenheim wrote: >> A quick question. When marking up XHTML should I be using entity >> names or entity numbers? Is there a standard or best practice? >> On Thu, 19 Oct 2006 13:29:44 +1000, Lachlan Hunt responded: > > ... > Even better than using references is to encode the file as UTF-8 > and just enter the real characters. Sorry to come late to this parade. Just wanted to add a couple of things I learned to watch out for. 1. If you can, choose a font for the editor that supports the characters (glyphs) you want to use. 2. Make sure that the font-family for the web page will display these glyphs. Browsers *may* make a substitution, but don't count on it. 3. Make sure your FTP options are set to transfer all files as binary *not* as ASCII. Cordially, David -- *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
RE: [WSG] Entity Name vs Entity Number
Well thanks everyone, especially Lachlan. I will have a look at all the links.Cheers.> Date: Thu, 19 Oct 2006 19:39:44 -0300> From: [EMAIL PROTECTED]> To: wsg@webstandardsgroup.org> Subject: Re: [WSG] Entity Name vs Entity Number> > Well, thank you both!> So I´m sure it was a problem of literally encoding the file.> Thanks again;> Eugenio.> > On 10/19/06, Lachlan Hunt <[EMAIL PROTECTED]> wrote:> >> > You need to make sure the file is actually encoded as UTF-8. You can't> > just label it as such and expect it to be so. That's like getting a> > block of milk chocolate, sticking a dark chocolate label on it and then> > wondering why it still tastes like milk chocolate!> >> > http://lachy.id.au/log/2004/12/guide-to-unicode-part-1> > http://lachy.id.au/log/2004/12/guide-to-unicode-part-2> > http://lachy.id.au/log/2005/01/guide-to-unicode-part-3> >> > As for the meta element, there is a much better way. Using the meta> > element for specifying the encoding in HTML is considered bad practice> > and it will not work in XHTML.> >> > http://lachy.id.au/log/2006/01/content-type> >> > > A person told me that as Win XP runs on Latin-1, the site will work> > > if I use tht encoding,> >> > Latin-1 refers to ISO-8859-1. Windows actually uses Windows-1252 as its> > default encoding, which is a superset of ISO-8859-1.> >> > --> > Lachlan Hunt> > http://lachy.id.au/> > > ***> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm> Help: [EMAIL PROTECTED]> ***> Be one of the first to try Windows Live Mail. ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]***
Re: [WSG] Entity Name vs Entity Number
Well, thank you both! So I´m sure it was a problem of literally encoding the file. Thanks again; Eugenio. On 10/19/06, Lachlan Hunt <[EMAIL PROTECTED]> wrote: You need to make sure the file is actually encoded as UTF-8. You can't just label it as such and expect it to be so. That's like getting a block of milk chocolate, sticking a dark chocolate label on it and then wondering why it still tastes like milk chocolate! http://lachy.id.au/log/2004/12/guide-to-unicode-part-1 http://lachy.id.au/log/2004/12/guide-to-unicode-part-2 http://lachy.id.au/log/2005/01/guide-to-unicode-part-3 As for the meta element, there is a much better way. Using the meta element for specifying the encoding in HTML is considered bad practice and it will not work in XHTML. http://lachy.id.au/log/2006/01/content-type > A person told me that as Win XP runs on Latin-1, the site will work > if I use tht encoding, Latin-1 refers to ISO-8859-1. Windows actually uses Windows-1252 as its default encoding, which is a superset of ISO-8859-1. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
TuteC wrote: I tried [using UTF-8] just yesterday with one of my sites, but it didn´t work. I had the meta http-equiv and the http header, with character encoding utf-8, but in my FF in Win XP it replaced with '?' any non ASCII character. You need to make sure the file is actually encoded as UTF-8. You can't just label it as such and expect it to be so. That's like getting a block of milk chocolate, sticking a dark chocolate label on it and then wondering why it still tastes like milk chocolate! http://lachy.id.au/log/2004/12/guide-to-unicode-part-1 http://lachy.id.au/log/2004/12/guide-to-unicode-part-2 http://lachy.id.au/log/2005/01/guide-to-unicode-part-3 As for the meta element, there is a much better way. Using the meta element for specifying the encoding in HTML is considered bad practice and it will not work in XHTML. http://lachy.id.au/log/2006/01/content-type A person told me that as Win XP runs on Latin-1, the site will work if I use tht encoding, Latin-1 refers to ISO-8859-1. Windows actually uses Windows-1252 as its default encoding, which is a superset of ISO-8859-1. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
Using Notepad++ -> View / encode UTF-8 than save.Using Dreamweaver -> Edit / Preferences :: Default encodingby!On 10/19/06, TuteC < [EMAIL PROTECTED]> wrote:I tried doing so just yesterday with one of my sites, but it didn´t work. I had the meta http-equiv and the http header, with characterencoding utf-8, but in my FF in Win XP it replaced with '?' any nonASCII character. A person told me that as Win XP runs on Latin-1, thesite will work if I use tht encoding, but then I got surprised on how many times I heard that it´s better using UTF-8 and just enter thereal characters! :-)Did I miss something, did anything wrong? Or it is just the way itworks, no Win allowed?Thanks a lot;Eugenio. On 10/19/06, Lachlan Hunt <[EMAIL PROTECTED]> wrote:>> Even better than using references is to encode the file as UTF-8 and> just enter the real characters. ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]*** -- Mihael Zadravectel: 00386 51 808136email in msn: mihael.zadravec na gmail.comSkype kontakt: mihael_zadravec--- Toasted Webhttp://www.toastedweb.com---Miss G. / bloghttp://missg.toastedweb.com ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]***
Re: [WSG] Entity Name vs Entity Number
I tried doing so just yesterday with one of my sites, but it didn´t work. I had the meta http-equiv and the http header, with character encoding utf-8, but in my FF in Win XP it replaced with '?' any non ASCII character. A person told me that as Win XP runs on Latin-1, the site will work if I use tht encoding, but then I got surprised on how many times I heard that it´s better using UTF-8 and just enter the real characters! :-) Did I miss something, did anything wrong? Or it is just the way it works, no Win allowed? Thanks a lot; Eugenio. On 10/19/06, Lachlan Hunt <[EMAIL PROTECTED]> wrote: Even better than using references is to encode the file as UTF-8 and just enter the real characters. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
Lachlan Hunt wrote: John Faulds wrote: http://lachy.id.au/log/2005/10/char-refs Looks like that article's gone missing. AH!!! I have no idea what has happened to it, it was definitely there when I sent the link. I'm sure I've got a back up, so I can restore it, I'll see what I can do. OK, I can stop panicking now, the crisis is over! Somehow that post and several others had been marked as private and were only visible to me cause I was still logged in to my CMS. I still have no idea how or when that happened, but never mind, the universe is back in order now – nothing has been deleted from my site. :-) -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
John Faulds wrote: http://lachy.id.au/log/2005/10/char-refs Looks like that article's gone missing. AH!!! I have no idea what has happened to it, it was definitely there when I sent the link. I'm sure I've got a back up, so I can restore it, I'll see what I can do. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
Herrod, Lisa wrote: Lachlan Hunt wrote: http://lachy.id.au/log/2005/10/char-refs I remember seeing them referred to as "character entities" in HTML 4.01 - was that an error in the publication, or is that what they were called back then...? It's one of the many mistakes in HTML 4.01, which was pointed out in the comments of my article. What HTML 4 refers to as character entities are just entities containing a single character. From an SGML/XML point of view, there is no difference between an entity containing a single character or a string of many, so the term "character entity" is more of a description than a name. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
>>>Even better than using references is to encode the file as UTF-8 and just enter the real characters. In ideal world, yes. Unfortunately I have to use entities because of legacy back-end scripts. I even wrote a small convertor[1] for this reason. 1. http://dmitry.baranovskiy.com/work/typo/ best regards, Dmitry Baranovskiy On 19/10/2006, at 1:29 PM, Lachlan Hunt wrote: James Oppenheim wrote: A quick question. When marking up XHTML should I be using entity names or entity numbers? Is there a standard or best practice? The correct terminology for "entity numbers" is "character reference", they are not entities. Read this whole article which explains everything you need to know about them. Regarding the terminology, take note of the first and second comments, which point out a mistake I made in the article. http://lachy.id.au/log/2005/10/char-refs You'll find the answer to your specific question under the heading "External Entity References". Generally, you should avoid named entity references in XHTML if favour of numeric or hex character references. http://lachy.id.au/log/2005/10/char-refs#charref-entity-ext Even better than using references is to encode the file as UTF-8 and just enter the real characters. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
http://lachy.id.au/log/2005/10/char-refs Looks like that article's gone missing. -- Tyssen Design Web & print design services www.tyssendesign.com.au Ph: (07) 3300 3303 Mb: 0405 678 590 *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
RE: [WSG] Entity Name vs Entity Number
That's really interesting, Thanks Lachlan. I remember seeing them referred to as "character entities" in HTML 4.01 - was that an error in the publication, or is that what they were called back then...? Lisa >-Original Message- >From: Lachlan Hunt [mailto:[EMAIL PROTECTED] >Sent: Thursday, 19 October 2006 1:30 PM >To: wsg@webstandardsgroup.org >Subject: Re: [WSG] Entity Name vs Entity Number > >James Oppenheim wrote: >> A quick question. When marking up XHTML should I be using >entity names >> or entity numbers? Is there a standard or best practice? > >The correct terminology for "entity numbers" is "character >reference", they are not entities. > >Read this whole article which explains everything you need to >know about them. Regarding the terminology, take note of the >first and second comments, which point out a mistake I made in >the article. > >http://lachy.id.au/log/2005/10/char-refs > >You'll find the answer to your specific question under the >heading "External Entity References". Generally, you should >avoid named entity references in XHTML if favour of numeric or >hex character references. > >http://lachy.id.au/log/2005/10/char-refs#charref-entity-ext > >Even better than using references is to encode the file as >UTF-8 and just enter the real characters. > >-- >Lachlan Hunt >http://lachy.id.au/ > > >*** >List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm >Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm >Help: [EMAIL PROTECTED] >*** > *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Entity Name vs Entity Number
Hi James,Theoretically there is no difference. I prefer to use numbers so make it not only valid XHTML, but also valid XML (XSL). It is easier to copy/paste code later. Also Netscape 4.x doesn't work properly with named entities, but who cares… best regards,Dmitry Baranovskiy On 19/10/2006, at 12:15 PM, James Oppenheim wrote:Hello all,A quick question. When marking up XHTML should I be using entity names or entity numbers? Is there a standard or best practice?Be one of the first to try Windows Live Mail. ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]*** ***List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmUnsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmHelp: [EMAIL PROTECTED]***
Re: [WSG] Entity Name vs Entity Number
James Oppenheim wrote: A quick question. When marking up XHTML should I be using entity names or entity numbers? Is there a standard or best practice? The correct terminology for "entity numbers" is "character reference", they are not entities. Read this whole article which explains everything you need to know about them. Regarding the terminology, take note of the first and second comments, which point out a mistake I made in the article. http://lachy.id.au/log/2005/10/char-refs You'll find the answer to your specific question under the heading "External Entity References". Generally, you should avoid named entity references in XHTML if favour of numeric or hex character references. http://lachy.id.au/log/2005/10/char-refs#charref-entity-ext Even better than using references is to encode the file as UTF-8 and just enter the real characters. -- Lachlan Hunt http://lachy.id.au/ *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***