Cyrillic dynamic text field problem

  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post August 28th, 2005, 5:26 pm

Hi, I’m developing a flash site with AMFPHP remoting.

The problem is that I have Cyrillic text returned from the database and it doesn’t display the Cyrillic font in the text field.

I’m generating the fields along with a movie clip dynamically with attachMovie.
I have embedded Cyrillic characters to the text field, but it didn’t work.

Can anyone help?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 28th, 2005, 5:26 pm

  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post August 31st, 2005, 8:28 am

I fixed it somehow, so I want to share it with you

I found it almost impossible to display Cyrillic characters witch is stored with Cyrillic encoding in the database.

So I altered the concept and used Cyrillic characters with a Unicode encoding.

This actually worked, because flash likes Unicode now :)
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Joined: Oct 12, 2004
  • Posts: 861
  • Loc: BKNY
  • Status: Offline

Post August 31st, 2005, 9:54 am

nice! thanks for posting your solution!
  • ZekeZeke
  • Born
  • Born
  • No Avatar
  • Joined: Sep 14, 2005
  • Posts: 3
  • Status: Offline

Post September 14th, 2005, 6:09 am

I have the same problem and I cant get it to work.
My friend (in Russia) will add text from a adminpage (php -> mysql) and that text should be presented in a flash-movie.

I've embedded the a font for cyrillic-characters and use it for my dynamic textfield, but it doesn't show correctly.

Could you please explain how u solved it? By example-code?
It would be so kind!

Thx!
  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post September 14th, 2005, 6:23 am

ZekeZeke the solution would be like this:

Your friend must make the admin page where you enter the data into the database with a unicode encoding.

This will save the text into the database as unicode characters and only then you will be able to see them in the flash movie.

There is noting you can do, your friend must make the changes.

I hope that helped.
  • ZekeZeke
  • Born
  • Born
  • No Avatar
  • Joined: Sep 14, 2005
  • Posts: 3
  • Status: Offline

Post September 14th, 2005, 6:31 am

Thanks a lot for your quick answer! Awesome!

I've made the adminpage (in php) where my friend should be able to enter the russian text. So i have to make the changes..

Will it solve the problem if I unicode encode the results from the admin form before I save it to the database or do I have to change something more? Like this or something:

sql="insert into tbl1(" . utf8_encode($_POST["text1"]) .")";

Do you understand what I'm trying?

Thanks again!
  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post September 14th, 2005, 6:44 am

You can do that, but it will be more painful.

you can simply make your html (php) page with an encoding:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

this way it less painful
  • ZekeZeke
  • Born
  • Born
  • No Avatar
  • Joined: Sep 14, 2005
  • Posts: 3
  • Status: Offline

Post September 14th, 2005, 6:51 am

Thanks again!
That sounds too simple! :)

So if I change that in my html-page with the form I don't have to change anything for the script that reads from the DB and send the Russian text to the swf?
Or do I have to set the:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

on the page that will show the text in swf-file?
Sorry if I'm asking too much but I really would like to solve it once and for all...

Cheers!
  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post September 14th, 2005, 6:56 am

I think it won't be necessary because the flash movie works with unicode, but it won't hurt to chage it.
  • ShapeShifter
  • Graduate
  • Graduate
  • User avatar
  • Joined: Sep 09, 2005
  • Posts: 159
  • Loc: Sweden
  • Status: Offline

Post September 14th, 2005, 11:55 am

Have ANYONE ever seen the "Character"-button in the Properties-panel when the textfield is selected?? if it's a dynamic TF you should specify it to embed cyrillic signs..
  • Red Hat
  • Novice
  • Novice
  • No Avatar
  • Joined: Jul 19, 2005
  • Posts: 16
  • Status: Offline

Post September 15th, 2005, 4:57 am

that doesn't work when you get data from a database, if the data in the database is saved with cyrillic encoding your f*cked.

Nothing will be shown in the textfield.

data MUST be in UNICODE
  • ShapeShifter
  • Graduate
  • Graduate
  • User avatar
  • Joined: Sep 09, 2005
  • Posts: 159
  • Loc: Sweden
  • Status: Offline

Post September 15th, 2005, 5:05 am

hmm.. interesting.... I haven't worked with cyrillic encoding before... this is worth some experimenting......

Post Information

  • Total Posts in this topic: 12 posts
  • Users browsing this forum: No registered users and 150 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2010 Unmelted, LLC. Driven by phpBB © 2010 phpBB Group.