# French text + urlencoding + html

**URL:** https://forum.kirupa.com/t/french-text-urlencoding-html/558
**Category:** flash
**Created:** [July 22, 2002, 5:11pm UTC](https://forum.kirupa.com/t/french-text-urlencoding-html/558 "2002-07-22T17:11:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vermaha](https://avatars.discourse-cdn.com/v4/letter/v/df788c/32.png) [@vermaha](https://forum.kirupa.com/u/vermaha)
#### Post date: [July 22, 2002, 5:11pm UTC](https://forum.kirupa.com/t/french-text-urlencoding-html/558/1 "2002-07-22T17:11:06Z")

</div>

Back again with a tricky issue concerning encoding, font embedding, HTML & PHP. The situation:

1. I’m loading text into a dynamic textfield (with HTML parsing turned on) in flash MX using PHP. That works fine. To send one big textstream I usually do a rawurlencode() or urlencode() in PHP. Flash displays simple HTML stuff like a linebreak or font color correctly.

2. But I do not seem to get any “special” characters in that textfield. Fact is that some of texts being displayed are in French.  
Flash MX does not seem to parse those characters correctly [é à è] etc.

3. On the Macromedia website it is recommended to use urlencoding ([http://www.macromedia.com/support/flash/ts/documents/url\_encoding.htm](http://www.macromedia.com/support/flash/ts/documents/url_encoding.htm)), with the corresponding codes.

4. I’ve tried turning off all HTML funcionality just to get the accented chars right, but I don’t see them in Flash. Font embedding doesn’t change a thing either.

5. I’ve also tried to send just one simple HTML string to the HTML textfield that should generate an “e accent aigue” using htmlentities() -\> &ecaute;  
But that doesn’t seem to work either.

6. Note: I’m not using any bizar font (just an Arial, Tahoma or Verdana) & I do understand there are two issues here: HTML / encoding.

HELP MUCH APPRECIATED!!  
It’s probably not all that difficult.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 22, 2002, 8:17pm UTC](https://forum.kirupa.com/t/french-text-urlencoding-html/558/2 "2002-07-22T20:17:28Z")

</div>

Works fine for me, i use

**$message = htmlspecialchars($message);**

to insert posts into the database, and

**$message = HTMLSpecialChars($post[‘message’]);**

to retrieve the stuff from the database before sending it to flash with

**$output .= “Message=” . urlencode($message);**

See test at  
[http://eyezberg.free.fr/forum/index2.html](http://eyezberg.free.fr/forum/index2.html)  
select “Test Forum” \> test specialchars…

aucun problème! Si ça marche pas, envoie moi tes sources…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 23, 2002, 11:18am UTC](https://forum.kirupa.com/t/french-text-urlencoding-html/558/3 "2002-07-23T11:18:00Z")

</div>

Je suis désolé… mais je ne vois rien sur ton site (beau !)… mais je pense d’avoir trouvé une solution.

Flash MX is fully utf8 compliant. In PHP you can do a utf8\_encode($yourstring); and it will show your French text with all the accents correclty, including all HTML functionality! That seems to work.

URL encoding as described in Flash does not produce the same results as in PHP.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 17, 2002, 8:35am UTC](https://forum.kirupa.com/t/french-text-urlencoding-html/558/4 "2002-10-17T08:35:48Z")

</div>

I was hopeless with urlencode function, because when I use flash 5, the text output was fine, however, with flash MX, the text output was not correct… like " G� " and not “Gómez”

I used utf8\_encode function for my spanish text, with á, í, … and it works fine…

tanks (Gracias)
