Displaying Unicode characters

J

Jonas

Hi!

I'm developing an ASP.NET application that fetches Unicode string data from
a SQL Server. I'm using "Lucinda Sans Unicode" as the font for my web pages
but when I have a string containing the subscripted character "2" (as in
CO2), I get the box character instead. This is a problem only in Internet
Explorer, because if I try my web page in Firefox, it shows the character in
a correct fashion. I've tried to use the Server.HTMLEncode function but it
doesn't help.

Any tips?

Jonas
 
J

Jan Il

Hi Jonas :)

You might try the following and see if it will work for you:

<sub>2</sub>

This should be encoding independent

Hope this helps :)

Jan :)
Smiles are meant to be shared,
that's why they're so contagious.

Replies are posted only to the newsgroup for the benefit or other readers.
How to make a good newsgroup post:
http://www.dts-l.org/goodpost.htm
 
R

Robert Aldwinckle

Jonas said:
Hi!

I'm developing an ASP.NET application that fetches Unicode string data from
a SQL Server. I'm using "Lucinda Sans Unicode" as the font for my web pages
but when I have a string containing the subscripted character "2" (as in
CO2), I get the box character instead. This is a problem only in Internet
Explorer, because if I try my web page in Firefox, it shows the character in
a correct fashion.

My guess is that Firefox is looser about interpreting multi-byte
characters than IE. What is the string of ASCII characters
that is being used to represent this subscript 2?

According to CharMap Subscript Two is U+2082

http://www.fileformat.info/info/unicode/char/2082/index.htm

shows that for UTF-8 it should be represented by E2 82 82

which means it could appear in Notepad (with character set
Windows Western) as
E2 - Latin small letter a with circumflex
82 - Single low 9 quotation mark

What do you see?


HTH

Robert Aldwinckle
---
 
J

Jonas

The HTML-source shows that the output is â,, (E2 82 82) as you suggested.

Should I in someway alter the encoding to get this to work in IE?

Brgds

Jonas
 
J

Jonas

Yes, I guess I could try to rewrite the HTML output if necessary, but I
rather would not because then I have to do this for every other possible
undisplayable character ...

Thanks

Jonas
 
R

Robert Aldwinckle

Jonas said:
The HTML-source shows that the output is â,, (E2 82 82) as you suggested.

Should I in someway alter the encoding to get this to work in IE?

Do you have an example that others could try and analyse?
Having a recreatable symptom is a requirement to having
an incident looked at for analysis and fixing.

I have been hoping to find ways of diagnosing these problems
which is more systematic and captures all the various factors
for analysis but haven't had much luck. I think it may extend
into a user's Language settings but I haven't had enough
incidents to support or contradict that conjecture.

Recently a poster who was having a similar problem discovered
that he could avoid the symptom by deleting an unused font.
I have no idea how that font would get selected for that particular
character. Unfortunately, he also didn't explain how he was able
to pick that particular font for deletion. Sounded like it was a bit
of a hit or miss procedure. FWIW here is a repeat of my final reply
to that thread:

http://groups-beta.google.com/group...roup:microsoft.*.ie6.browser#f5d38557c0a8b6d6

(Google Groups search for:
lotus font aldwinckle group:microsoft.*.ie6.browser
)


BTW I think you would probably get more knowledgeable comment
from a newsgroup which specializes in web development.


Good luck

Robert
---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top