headbanner

Menu:

nigel-1

Quick Notes:

April 20th, 2008:
Ruby is all syntactic sugar once you get into it. Its not a bad thing, but one should remember that. Rails does too much at run time, and I'm missing JavaScript. Need to finish my XUL based XDebug client for PHP.

Read more...

About Nigel

Nigel is a consultant at ThoughtWorks, seeking a code free nirvana. Unfortunately he's missed the second left.

Previous Posts

- Questions for the Campers at BarCampMumbai2

- GTAC 2007, Selenium, and the UI as objects in test...

- Installing Xdebug for PHP on Centos 4 (server)

- Learning Javascript the right way.

Archives

- August 2007
- October 2007
- January 2008
- February 2008
- March 2008

My choice of links
worth visiting

Check out

- BookEazy
- Intermission
- Sukshma
- CodeWord
- TechCrunch

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]

Hi. You've reached Nigel.in

This site is still in its very early stages, but what you have landed on, possibly inadvertently, is the website of a certain curious character a.k.a Nigel Fernandes

The aim of this page was to serve as a landing point for those of you who want to know a little more about me. The links on the right and left will take you deeper my world, or possibly on to different exciting things.

Its a big web out there and this is just one more street for you to saunter down. I hope you like it.

Close this.

My Photo
Name:
Location: Panjim, Goa, India

Crazy, dancing, programming, Goan.. I'm a computer geek and proud to be one. I program in Java, Ruby and .Net, PHP, Javascript. A lot of my recent work has been about CSS and UI design practices for large scale websites and Agile teams. I still while away hours dreaming up a web startup.

 

Unicode Rendering in Firefox is broken.

Sunday, January 13, 2008

Its not often you get to complain about a bug in Firefox. Yes, of course there are quite a few, but in the course of general web programming you don't see them too often.

But I stumbled over an absurd bug a few weeks back. (I procrastinate, hence this post is much delayed). When we tried to put some Devanagari (Hindi) text into an HTML page, it would render fine on IE 6 and 7 but come out broken on Firefox 1.5 and 2.x.

Whats the Unicode Bug in Firefox ?
If you put Unicode into an HTML page and it turns out broken in Firefox 1.5.x or Firefox 2.x , but looks fine in IE 6 or IE 7, chances are you've stumbled on to this bug.

Whats the cause?
Simple. You probably have a text-align:justify CSS style property set on the Unicode text in question. Its a weird bug, and the last place I expected to find the cause of my broken rendering issue was a simple CSS alignment property.

How to fix the Unicode Bug in Firefox?
Even simpler. Change the text-align property to any other valid value other than justify.

Is there a work around?
Nope. There isn't any. The Firefox team have been aware of this bug since Firefox 1.5, but haven't scheduled a fix till Firefox 3! Why? Well, the bug is actually resent in the core Gecko engine (so it is present in your XULRunner based Applications as well), and Firefox 2 was all about the UI fixes and clean up. So this fix got moved to Firefox 3. The good news is that Firefox 3 beta's are already here and looking good.

Is there really no work around?
Well, if you really can't change the way your site style is built, (to many users on IE to justify this change for example), or if you are not part of the sites developer team, then you can try out building a custom Grease Monkey script to fix the problem for the specific site. Be warned though, that this requires you to know JavaScript, and will require you to basically overwrite the CSS property for the site in question in your local browser.

Amit Chakradeo has tried this out.

Where can you read more?
Look up the original Firefox Bug Report:
Bug 240914 – "text-align: justify" ruins Unicode combining characters (e.g. Devanagari, Tamil, Bengali,Malayalam,Kannada)

Labels: , , , , , ,


Comments:
Two years back, I wrote a greasemonkey script to fix this. More info at my blog,
http://saravan.blogspot.com/2005/05/mozilla-bug-270012.html
 
I have built sites in Japanese and am using FF3 which will not display unicode at all for Japanese, Chinese, Korean or similar and my sites are not utilizing the align=justify style.

Always seems that whenever anything is malfunctioning on any site I build, it is always firefox screwing it up
 
Post a Comment

Subscribe to Post Comments [Atom]





<< Home