TwelvestoneFlash

special characters - php>xml>flash


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Keavy
 
2003-08-05

OK, i'm sure this is common knowledge to everyone with a functioning brain, but alas ...

mostly i need to fix text containing é

so in my content gathering script i tried to add a bit to the fixing stuff lines, like so: [php] $row['content'] = ereg_replace(233, "\u00E9", $row['content']);//é $row['content'] = ereg_replace(13, "", $row['content']);//carriage returns $row['content'] = ereg_replace(10, "", $row['content']); //line feed[/php]

i got that \u00E9 from Moock

but it just shows up the '\u00E9' in my text, so what is you're meant to do? k

sakri
 
2003-08-05

hi there, long time no see k

I think if you put this as a declaration to the xml document it will work.... (you can just send the accented characters as they are)

<?xml version="1.0" encoding="UTF-8"?>

if that doesn't do the trick, then add this line in the flash:

System.useCodePage=true;

k

//persist has the lowdown on all this though... he may provide a better solution

persist
 
2003-08-05

no you got it.

The best thing to do, so your not tailoring your xml files just for flash is to simply insert the literal character into your xml file. That way, down the road, some other technology suddenly can't read your "\u" junk.

The xml is already unicode, why make it more complex?

Keavy
 
2003-08-05

hey k

ooh, it didn't like it when i put the xml tag in :(

the php script outputs the xml with the characters fine, like so: Consommé ... but flash doesn't show it up correctly. is that what you meant persist?

persist
 
2003-08-05

is it being saved as utf8 or plain text files?

Keavy
 
2003-08-05

flash is loading the xml straight in from that php script

persist
 
2003-08-05

hmm I think it might be outputting as plain text.

can you make a dummy xml file in notepad, save as utf8, and test it?

otherwise you can try the suggestion of making System.useCodePage=true;

but since it may not be unicode anyhow, it might not work, but it may.

k

Keavy
 
2003-08-05

woo-hoo! that: System.useCodePage=true; did the trick

[stoopid]wasn't sure where to put it at first[/stoopid] k

thanks :thumbsup:

persist
 
2003-08-05

thank sakri, he had it from the beginning.

k

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

special characters - php&gt;xml&gt;flash