Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unicode Characters Not Displayed 2

Status
Not open for further replies.

xyzuser

Technical User
Aug 13, 2008
96
US
I put the HTML equivalent ♬ of unicode character code \u266C into my HTML (This is defined as Beamed Sixteenth notes though for my purposes any musical note character will do.)

When I look at the web page on one of my PCs in IE 6.0, the notes are properly displayed. However, when I look at the same page on my second PC in IE 7.0, the notes are not displayed (I get the little boxes instead).

But Firefox (3.0.3) on the same second PC does display the unicode musical notes correctly.

What am I doing wrong with the Unicode characters. I could circumvent this by using an image of a musical note but that's a lot of extra coding. Shouldn't this unicode work in all versions of all web browsers? Or am I not understanding something basic about using Unicode.

Thanks
 
Thank you, Feherke.

I'm sorry but I don't understand what you are suggesting. I have
Code:
 <META http-equiv=Content-Type content="text/html; charset=windows-1252">
I tried changing it to
Code:
 charset=UTF-8"
That did not help the IE 7. (though it did point that I had missed some quotation marks and had " instead of &quot; which was now interpreted as boxes in IE and ? in Firefox - but I'll fix that)

What charset am I supposed to specify? What is your suggestion about fonts? What font am I supposed to specify for the unicode special characters? Firefox doesn't have any problem finding the font for the characters, and it is on the same PC as IE7. And IE 6 on the other PC found the fonts. Sorry but I am not experienced with these aspects of HTML.
Thanks
 
Hi

Yes, that is one of them. You certainly have to specify UTF-8 in your [tt]meta[/tt] tag. Beside that, you have to ensure no other charset is specified in the [tt]Content-Type[/tt] HTTP header.

To see the HTTP headers, you will need a suitable tool :
[ul]
[li]Browser:
[ul]
[li]FireFox:
[ul]
[li]Live HTTP Headers[/li]
[li]FireBug[/li]
[li]Web Developer[/li]
[/ul]
[/li]
[li]Lynx[/li]
[li]Links[/li]
[li]W3M[/li]
[li]Explorer:
[ul]
[li]ieHTTPHeaders[/li]
[li]IEWatch[/li]
[/ul]
[/li]
[/ul]
[/li]
[li]tool:
[ul]
[li][tt]netcat[/tt][/li]
[li]PuTTY[/li]
[li][tt]telnet[/tt][/li]
[li][tt]Wget[/tt][/li]
[/ul]
[/li]
[/ul]

Regarding the fonts, not all characters are drawn in all font files. If you have no [tt]font-family[/tt] specified or you specify a generic font family, the browsers will use their built-in or configured defaults. Which may differ, so may lead to the difference described by you.


Feherke.
 
Vragabond-

I looked at that website and most of the music characters listed in the table are not displayed properly in IE 7, just as my page is not. Firefox (same machine as IE 7) continues to display that website's entire table of musical characters correctly (as does IE6 on my first machine)

However, I saw that &#9835 (Beamed Eighth Note) and &#9834 (Eighth Note) do get displayed correctly in that website table. So I changed my &#9836 on my page to &#9835 and now I get a music note displayed (Doesn't matter for my application which note it is).

So thanks (and a star) for pointing me to that page. Otherwise, I would not have realized that some notes do get displayed correctly and I can substitute one of them for what Iwas using.

feherke -

This page that Vragabond pointed me to has utf-8 specified so that didn't make a difference. I can't see what fonts may be specified in its CSS as they are external.

But thank you (and a star) for your explanation, for the tools that you listed and for your time.

 
xyzuser, you might want to try upgrading your IE7 on your machine or something because IE7 on two machines that I tried displayed all the musical notes on that page properly, exactly the same as FF.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Vragabond - Thanks for the suggestion. I went to the website you pointed to on a PC at work just to see what would happen and IE7 failed again to display the notes, just as it failed on my machine. Wonder if you have some other level of IE7. (This one is 7.0.5730.11IC)

Thanks again!
 
Note that the "IC" in the version number denotes that that version of IE is NOT a bog-standard version, but one created by an internet content provider with the IEAK, and so may well not do everything correctly.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Thanks BillyRayPreachersSon & Vragabond. I'll have to check into that. My real concern was that anyone going to the website would not see the special characters.

I'll have to check about the later release. But if it is just a problem of a customized version of IE7, then I'm not so concerned as I doubt that many people (outside of businesses) would have it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top