Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing ë chars to flashMX listbox with getvars 1

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
0
0
Hi,

Im trying to pass some special characters to flash like ëèï etc. to flash using a loadvars() object.
This loads a textfile with variables like:

foo=bër&foo2=bïr

These are then loaded into the FlashMX listbox with
list.addItem(foo, foo2);

problem is its not working.... The problem being the special chars as adding normal text works fine.

Any ideas what im doing wrong?

Thank you,
Thomas

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Addition: i would prefer to use phps function urlencode to change all the special characters to %20 type entries. but can flash (listbox) handle these?

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Yes Flash can handle URL encode. To decode the encoded string, just use "unescape()".

Alternatively, you can generate a Unicode XML from PHP. Then you can use any character in any language.

Kenneth Kawamoto
 
Thank you for your reply. I cant realy do it in xml anymore.. to much code has been written already based on the loadvars system and i need to finish this project.

i tried with the unescape but with no luck.

this is the data in the textfile generated by php:

Code:
total=5&entry1=Geloof+en+Bijgeloof+etalage+en+display&organizer1=Boomker+boeken%2B&num1=1&entry2=De+Kabbalist&organizer2=Boomker+boeken%2B&num2=2&entry3=Mythen+en+Bomen&organizer3=Hortus+Haren&num3=3&entry4=Henricus+Munting+en+de+geneeskunst+in+de+gouden+eeuw&organizer4=Hortus+Haren&num4=4&entry5=De+Magi%EBr&organizer5=Hortus+Haren&num5=5

its <b>entry5=De+Magi%EBr</b> thats being a problem, this should read Magiër in Flash.

this is the (simplified) flashcode:

Code:
listdata.sendAndLoad("getlist.php", listdata, "POST");
listdata.onLoad = function() {
    trace(listdata.entry5);
    trace( unescape(listdata.entry5));
}

this returns "De Magi" in both cases. So it seems the whole ë part isnt even getting into flash for some reason?





I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
That did the trick!! Thank you!

(next time deffenetly xml!)


Thank you.



I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top