Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 3 of 3

Thread: Sending UNICODE encoded XML from ASP.NET to Flash

  1. #1
    103
    posts
    Registered User

    Sending UNICODE encoded XML from ASP.NET to Flash

    Hi Guys,
    I don't quite know if this problem lies with ASP.NET side or with the Flash side
    So if you could help me out, it'd be awesome

    I'm in the flash side construction of an application that gets its data from .Net code using the Response.Write method
    The output to flash is XML formatted string which I capture in Flash and store it in an XML variable.

    The problem comes when special characters are sent in the XML, for example if any attribute or node value has an apostrophe in it
    (e.g. <market_info name='Jun's ABC'/>)
    the application breaks and the XML is not parsed properly as it recognizes the apostrophe as an terminating character

    After some experimentation with a stand alone flash application taking data from local static,dummy XML files,we found that substituting Unicode values for special characters eg. &#x007E; Flash was automatically interpreting them correctly.
    However when the same was tried by sending data using Response.Write, instead of interpreting the Unicode, Flash would display the code as is on screen.

    Is there any way to properly send Unicode encoded Strings to Flash from ASP.NET?

  2. #2
    For the text nodes you can use CDATA

  3. #3
    103
    posts
    Registered User
    Thanks, rille31
    Yes I tried using text nodes and they worked fine in for the node values, but posed a problem when it came to attributes of the nodes itself. Go figure
    But I got an update on the issue.

    After debugging nearly every single line when data was trasferred from one point to another, we found out that, though in the database the UNICODE was stored as &#x007E; , when being passed to .NET it became &apos;#x007E; and that was being passed onto Flash.
    Flash then diligently converted &apos; to & and displayed , as it should, &#x007E; on the screen.

    Having found that out, escaping the &apos; from .Net before sending to Flash solved the issue.
    Oh , an interesting note, Flash display &#x0027; as &apos;.
    If you want apostrophe in UNICODE to be sent to flash, &#x2019; is your best bet.


    ~TNE

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012