# Converting string to ASCII or similar

**URL:** <https://forum.kirupa.com/t/converting-string-to-ascii-or-similar/97434>\
**Category:** Uncategorized\
**Created:** [December 22, 2003, 12:42pm UTC](https://forum.kirupa.com/t/converting-string-to-ascii-or-similar/97434 "2003-12-22T12:42:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScriptFlipper](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@ScriptFlipper](https://forum.kirupa.com/u/ScriptFlipper)\
**Post date:** [December 22, 2003, 12:42pm UTC](https://forum.kirupa.com/t/converting-string-to-ascii-or-similar/97434/1 "2003-12-22T12:42:12Z")

</div>

Hi!  
I have a small problem. In Sweden we have these characters å, ä and ö (and of course also in caps). But my MySQL db can’t store åäö characters, so if I look in the db and search for my name, Boström, i can’t find it…  
(this forum must encode them in some way, right?)

The search is ran from within flash (mx2004, and from there to a php-script, wich then sends the matching row back to flash.

I want to convert all the åäö’s in a string, and to be able to reconvert them when flash gets the string back… So the string should be stored in the db with the åäö encoded…  
(am I confusing you now?)

And I can’t use the html-code for å (å) 'cause if the php-script prints this:  
&str=Bostråm  
the AS will think that str=Bostr (it stops at the other &-sign…)

(and what if there are multiple instances of the characters åäö in a string?)

Wow… quite an explanation…  
Ok, short summary:

AS-sting: Boström  
\>encode (so that ö=ASCII or so)  
\>send to PHP-script  
\>store in MySQL-db  
\>SELECT from db in PHP  
\>print string  
\>get into AS  
\>decode  
\>display string: Boström

thank tou very much in advance!
