A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: special character entity encoding

  1. #1

    special character entity encoding

    is there a way to have flash use the CODE ( &whatever; ) for special characters or do i have to write my own parser?

    thanks

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    If you have an XML document that uses General Entities, you need to make sure that they are 'standard' entities... that having been said, any entity that is 'standard' will be replaced by it's character... before you can get at it in Flash... does that answer your question??

    If you were creating the XML document in Flash, and you wanted to 'escape' specific restricted characters, then just use the escape function in Flash...
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  3. #3
    thanks for the reply.

    actually, im not going FROM and xml doc but TO one, i think. i am cutting and pasting text from a pdf that has special characters in to flash. i proccess the text in flash and pass it to html input boxes via the URL. from there i have no control, but i was told that special characters needed to be encoded beforehand. i know about the escape function, but the %hex encoding isnt the same as the xml entity codes that they need.

    i dont know much about xml, but perhaps i need to proccess the text before it comes to flash? but i want to minimize the transfering i have to do. any suggestions?

    thanks again

  4. #4
    Senior Member
    Join Date
    Feb 2001
    Location
    Provo, Utah
    Posts
    1,112
    If you're talking about placing 'markup' inside an XML document... then just wrap it in CDATA tags... http://tupps.com/flash/faq/xml.html#5-D is a good place to start.
    Richard Lyman
    rich at lithinos.com
    www.lithinos.com

  5. #5
    i dont really know if it will be used in an xml document or not, just that they want all the special charaters coded. anyway i wrote a routine to do the substitutions but i have a new problem:

    when you paste to an input box in flash, it shows the wrong symbol. i copied and pasted that symbol back to the actionscript window to see what was going on, and it displays a sideways L next to the symbol that should have appeared.

    what is flash doing to input text and how can i change it to the character i want so i can encode it? i tried adding the L to what i look to replace but to no avail...

    appreciate any help, thanks

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center