Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2012
    Posts
    123
    Thanks
    18
    Thanked 0 Times in 0 Posts

    Unicode font error

    I develop a webpage with unicode font
    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    and use alert javascript to show some unicode text, but sometimes it shows OK, sometimes it shows the wrong unicode characters. I do not know what is the reason, why it OK and why not.
    Anything need to delcate more in .htm?
    And in css, is there any declaration related to unicode?
    Thanks if someone point out.
    Last edited by docco; 07-14-2013 at 09:09 AM.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,666
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    Make sure the files themselves are saved in UTF-8. Also, sometimes special characters don’t work in JavaScript (don’t remember why and how at the moment) you need to hex-encode them, e. g. a whitespace in JavaScript is declared as \u0020.

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,978
    Thanks
    15
    Thanked 230 Times in 230 Posts
    You have to get a lot of things right for Unicode to work, the right font, the language of the page, the page document type. XML, and presumably XHTML, works well with Unicode. An .svg file is XML, and can be used to display on a web page. A browser will provide some support for it, but only some, the rest you have to provide.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •