Solved

HTML Entities and Browsers

Posted on 2007-03-21
4
376 Views
Last Modified: 2012-06-27
Hi Experts,

I am generating HTML pages from XML. I would like to know whether the XML entities and HTML are same.

ie., For instance, XML "Thin Space" has the entity code " ", I would like to know whether I have to code this XML entity as "&#x02009" or "&#02009" in HTML without the 'x'.

I am seeing a difference in recognizing the entities in Firefox and in IE. For Instance, the entity "Thin Space" is reflected as a "Thin Space" in Firefox but it is displayed as a box character in IE. The Character Encoding selected in both the browsers are UTF-8.

Please advice.

Regards
Vijay T. Prabakar
0
Comment
Question by:CIPL-Senthil
4 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 250 total points
ID: 18769547
yes, they are the same.
The number is the character referenece in the unicode standard
Every modern browser should be able to show the exact glyph based on the entity

Of course the particulara glyph needs to be supported in the font-family/size/weight/decoration combination you use

FireFox points by default to a font family that supports most of the unicode characters
IE shows a box, because it has no glyph available
You can swithch the default characterset to a unicode set in the browser
but you can't expect that all your users would do so

If you encounter a problem with a character in IE,
it might be wise to work around that one
eg. a thin space could be replaced by a space in a span with a smaller font-size

cheers

Geert
0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 250 total points
ID: 19347831
and this?

 

should work in all browsers in all codepages?
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question