Results 1 to 3 of 3

Thread: Character encoding error

  1. #1
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Character encoding error

    I'm sending some text from PHP to flash, but, despite trying several solutions, it keeps having some character errors, due to accentuation from portuguese language.

    The way i am sending the vars to flash is throw get method :

    echo 'var so = new SWFObject("anima/advertencia.swf?dbaviso='.$aviso.'", "advertência", "145", "170", "9", "#FFFFFF");';

    Can anyone help me on this?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    By default, Flash reads all external code as Unicode. So, if your text isn't saved as Unicode or is encoded using some other encoding method, this could cause problems.

    The fix for this is to use:
    Code:
    System.useCodePage = true;
    Setting System.useCodePage to true means that Flash will then use whatever the OS's default encoding is.

    More info.

  3. #3
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The problem was solved.

    The error was in the html page, in the charset encoding.

    I change to "UTF-8" and it solved the problem.

    Thanks fow your help

Bookmarks

Posting Permissions

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