Wednesday, October 6, 2010

Silverlight 4, FireFox and Accented Characters

My mother gave me a very common portuguese name: João. You can translate it to 'John', 'Jean', 'Juan' (take your pick). The odd thing about my first name are the three consecutive vowels and the tilde character on top of the 'a'. I get all sorts of funny jokes from my anglo-saxon friends due to this personal oddity. Why is this relevant?

I have been working with Silverlight 4 for a web application (I'm essentally rewriting a big HTML SaaS application) and met a very strange behavior with Silverlight 4 when running on FireFox (and Chrome): I just could not write my name on a TextBox! This is a situation that has been reported by some users but, interestingly, it's not a very common complaint. Of course IE works OK with this.

When searching for a solution for this problem, I found a sample where this issue did not happen. After a bit of research I found the culprit: the "windowless" parameter on the HTML object element (my code had it while the sample did not). If you set this parameter to "true", FireFox will not compose the '~' and the 'a' to produce the dreaded 'ã', so beware!

This issue is irrelevant for english-speaking (and writing) users.

3 comments:

  1. So have you evaluated the database options for Windows Phone 7 and arrived at any conclusions about how to proceed with data-based applications? I've read that a version of SQL Compact might be available in later versions of WP7. Any thoughts?

    ReplyDelete
  2. There are a few options out there, namely a C# port of the SQLite engine that runs on isolated storage. SQL Compact will be a better choice when Microsoft decides to publish an API for it (a native engine should run faster than a managed one, I would say). Meanwhile, I have not investigated deeply into this subject (waiting to get my hands on a WP7 device).

    ReplyDelete
  3. Hi João Paulo Figueira

    as per your suggestion if we set Silverlight object's property windowless=false then accent characters like à,É are working with Google chrome & Firefox in Silverlight 4 application.

    But i have used RadHtmlPlaceholder control of telerik in one page and it's requires windowless=true otherwise it thorws the exception.

    can you help on this issue?
    is there a way that we can set windowless property at runtime?
    or any other solution for the accent charcters?

    ReplyDelete