locked
IE 7 - Chinese Content Garbled in Javascript Alert Box RRS feed

  • Question

  • Hi Team,

    I am implementing globalization to one of the applications. As per the requirement I need to alert some text using Javascript alert boxes. The Chinese content is displayed fine for Browsers IE8 and above. But in case of IE7, the chinese content displayed in the Javascript alert box is completely garbled (only square boxes are displayed). What would be the solution for this?

    Many thanks

    Friday, April 20, 2012 5:33 AM

Answers

  • Hi,

    The OS default font settings....

    On windows 7 and earlier, users can customize their settings for screen fonts and colors (Personalization)... I think the js alert box uses the Message box settings from the Desktop theme manager settings... some third-party themes that users install include the font names but don't include the actual font files... you end up in situations where ui elements do not display properly because a particular font family that is specified in a custom desktop theme does not exist on the client machine...

    this became a big support issue with XP users with Windows Blinds or Alienguise installed on their machines.

    Nothing you can do about it.... particuarly from a web page....

    the best practice for multi-cultural web pages is to use utf-8 encoding and not to use font-families in your page style rules... web browsers will default to the font-families that the user has specified in their browser preferences...see Internet Options>General tab, 'Fonts' button.

    also see

    http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx

    the placement of your meta charset tag is all important in how the rest of your document is decoded....

    consider using the Microsoft Translator widget on your webpage... (see Eric's blog above)

    realize also that users with IE7 and higher have access to Translation accelerators.

    Regards.

    ref: http://www.w3.org/International/O-charset


    Rob^_^


    Oh... you can avoid the issue by using popup div elements instead of alert and confirm statements. You will have full control on the font styles used in the div element then.
    Friday, April 20, 2012 6:56 AM

All replies

  • Hi,

    The OS default font settings....

    On windows 7 and earlier, users can customize their settings for screen fonts and colors (Personalization)... I think the js alert box uses the Message box settings from the Desktop theme manager settings... some third-party themes that users install include the font names but don't include the actual font files... you end up in situations where ui elements do not display properly because a particular font family that is specified in a custom desktop theme does not exist on the client machine...

    this became a big support issue with XP users with Windows Blinds or Alienguise installed on their machines.

    Nothing you can do about it.... particuarly from a web page....

    the best practice for multi-cultural web pages is to use utf-8 encoding and not to use font-families in your page style rules... web browsers will default to the font-families that the user has specified in their browser preferences...see Internet Options>General tab, 'Fonts' button.

    also see

    http://blogs.msdn.com/b/ieinternals/archive/2011/07/18/optimal-html-head-ordering-to-avoid-parser-restarts-redownloads-and-improve-performance.aspx

    the placement of your meta charset tag is all important in how the rest of your document is decoded....

    consider using the Microsoft Translator widget on your webpage... (see Eric's blog above)

    realize also that users with IE7 and higher have access to Translation accelerators.

    Regards.

    ref: http://www.w3.org/International/O-charset


    Rob^_^


    Oh... you can avoid the issue by using popup div elements instead of alert and confirm statements. You will have full control on the font styles used in the div element then.
    Friday, April 20, 2012 6:56 AM
  • Hi Guys,

    Thanks for all the suggestion, much appreciated!

    The website I am talking about is a closed community site. So, I think the best option would be to install the language packs on the machine. I have tried installing the language pack and tested the application, the content in the Javascript alert boxes is all displayed fine.

    Once again thanks for all your guidance.

    Kind regards

    Friday, April 20, 2012 10:48 AM