Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#344620 - 01/05/2011 04:41 Weird HTML rendering thing - Cyrillic characters... Please help.
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Can anyone hit me with a clue bat on this one?

Okay, using Firefox, go here:

http://vixyandtony.com/index.html#select=Vixy
Select the "Vixy's Blog" tab if not already.

Note that portions of the lyric she posted are mis-rendered garbage characters.

Now, right click on the page, select "Save Page As..". Under "Save as type:" choose "Web page, html only." Give it a fun name like "test.html".

Now, the HTML file you just saved to your hard disk, which is, in theory, the same thing you just surfed to on the web... Open that HTML file on your hard disk in Firefox.

You'll notice that the graphics don't work but we don't care about that. Click on the "Vixy's Blog" tab, and note that the characters that were garbage on the web version are perfectly good Cyrillic on the one from your hard disk.

Why do the two things render differently? Why does the hard disk one render right and the web one render as garbage characters? What do I need to fix to make the web one look pretty like the hard disk one?
_________________________
Tony Fabris

Top
#344621 - 01/05/2011 06:06 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: tfabris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
Page encoding, the text is in Unicode UTF-8 but the browsers think it is ANSI. Add a meta tag to your head element:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
_________________________
Remind me to change my signature to something more interesting someday

Top
#344622 - 01/05/2011 06:10 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
Ok that is odd.

I loaded the page in Chrome, the characters were broken. I forced the encoding to UTF-8 in Chrome the characters were fixed.

I then checked the source of the page and I was sure there was no content type tag. I then reloaded the page and for some reason the characters were fixed. I checked the source again and sure enough there was a correct content type tag.

Did you fix it in the meantime or am I having a pre-first-coffee moment of madness ?


Edit:

Loaded it in FF and the characters are broken with the tag there. I guess Chrome was remembering my forced selection of encoding.

Anyway, what ever is going on it is an encoding issue of some sort, something is confusing the browsers as to the encoding of the page.


Edited by andy (01/05/2011 06:13)
_________________________
Remind me to change my signature to something more interesting someday

Top
#344623 - 01/05/2011 06:17 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
You web server at vixyandtony.com is emitting the following header for index.html:

Content-Type: text/html; charset=ISO-8859-1

That is likely to be the cause, the browsers are using that rather than the utf-8 set in the meta tag.

I'm not up on Apache and charsets, but this looks like what you need:

http://www.w3.org/International/questions/qa-htaccess-charset


Edited by andy (01/05/2011 06:21)
_________________________
Remind me to change my signature to something more interesting someday

Top
#344624 - 01/05/2011 06:20 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Yeah that UTF-8 tag should be there.

I tried adding extra ones in different spots (earlier before I made the post, so that does not explain your experience) and it never got better.

Odd that (for me at least) it comes up fine on the disk and bad in the browser, when the two things should be using the same UTF-8 tag.
_________________________
Tony Fabris

Top
#344625 - 01/05/2011 06:21 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Aha the web server is doing it. Okay, is there a way I can fix that by editing files in my HTML directory?
_________________________
Tony Fabris

Top
#344626 - 01/05/2011 06:23 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: tfabris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
Originally Posted By: tfabris
Aha the web server is doing it. Okay, is there a way I can fix that by editing files in my HTML directory?


We you could save the pages as ANSI as long as all the characters in the page really are in the same ANSI codepage. But you don't really want to do that, what you really want to do is fix the server to emit the correct headers.

See the edit I made to my previous post.
_________________________
Remind me to change my signature to something more interesting someday

Top
#344627 - 01/05/2011 06:25 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Perfect. Saw the edit, will do the work to htaccess file. THANKS!!!
_________________________
Tony Fabris

Top
#344628 - 01/05/2011 06:26 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: tfabris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5916
Loc: Wivenhoe, Essex, UK
Anyway, the far more important question is, when are you going to release another album ?

Thirteen is one of my most played albums over the last couple of years...
_________________________
Remind me to change my signature to something more interesting someday

Top
#344629 - 01/05/2011 06:33 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: andy]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Thank you so much!!

I was actually mixing one of the songs for the new album this week. The album will take quite a while but we've got two songs recorded so far. :-)
_________________________
Tony Fabris

Top
#344630 - 01/05/2011 12:44 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: tfabris]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
Now that your issue is fixed, Tony, is it okay if I ask about a web font rendering issue as well?

I've noticed that on several sites, Chrome displays a certain type of font poorly in a way that FF and IE do not. I've attached a screenshot of what it looks like in Chrome versus FF. The only site I could remember that does this is some Cisco pages, but I've seen it on others.

Is there a way to fix this for Chrome, my preferred browser?


Attachments
chromefont.jpg


_________________________
Matt

Top
#344633 - 01/05/2011 13:41 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
I haven't solved my issue quite yet, I was going to fix it today. :-)

Is yours an issue where small-point-size fonts get rendered without antialiasing?

Or maybe it's not the point size, maybe the rendering engine can't handle that particular combination of elements and layers, and it loses the AA in the process?
_________________________
Tony Fabris

Top
#344634 - 01/05/2011 14:22 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: tfabris]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12341
Loc: Sterling, VA
Haha, sorry, I thought you weren't using this thread anymore and that I could use it for a while wink

I hadn't noticed, but I think you're right about the antialiasing. Why would that happen, though? Is it something I'd be able to fix on my end?
_________________________
Matt

Top
#344635 - 01/05/2011 14:32 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: Dignan]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
I've got no idea, all I know is that when I zoom in on that page it looks like a font where the antialiasing just failed.

I successfully fixed the web site just now, and it was funny. I made the repair to the .htaccess file to make the Cyrillic post come out correct, and that broke all the other places where I'd special-cased foreign characters (resumé, bodhrán ©, etc) and I had to fix all of those. I'd managed to find work-arounds for that stuff years ago without solving the root problem. Now that I'd solved the root problem, the other stuff stopped working. smile
_________________________
Tony Fabris

Top
#344636 - 01/05/2011 14:41 Re: Weird HTML rendering thing - Cyrillic characters... Please help. [Re: Dignan]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Cisco is using cufon to do font rendering. It looks like there may be a known problem with Chrome and cufon.
_________________________
Bitt Faulk

Top