Question

Extended Ascii causing trouble after mysql_fetch_array()

Asked by: Alwin

Hello Experts,

I don' know if this is the right place to put this question.

I have a Flash application which gets data from a MySql database.

Flash-buttons on the flash trigger functions in a PHP class.
(For example:  retreiving rownumbers for navigation)

The weird thing is that if any field of a retrieved record (mysql_fetch_array() command) contains an extended ascii code character (i.e.:  ï or é  etcetera, Dec ascii value >127) the PHP class does not function anymore.
I Mean the whole script is being executed allright after the mysql_fetch_array() command, but next time the the PHP-class is called upon it does not function anymore.

Does anyone know a solution for this?

Thanks
Alwin

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-10-04 at 23:18:16ID20757524
Tags

extended

,

ascii

,

mysql_fetch_array

Topic

MySQL Server

Participating Experts
4
Points
400
Comments
31

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Fetching from mySQL
    I have a very basic login script I wrote (my first php script in fact), and I'm having trouble getting data back from mySQL. The code sucessfully evaluates the username and password, but I was hoping to get data back from the record and display it. Here is my code so far, I...
  2. mysql_fetch_array
    what is the difference betaween mysql_fetch_array and mysql_fetch_row Please show me and example Thank you

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: VGRPosted on 2003-10-05 at 00:04:25ID: 9493746

could you please post the class, and describe fully the problem ?

 

by: AlwinPosted on 2003-10-05 at 01:31:12ID: 9493855

Hi VGR,

The problem:

The flash has buttons that trigger the functions:  volgende(), vorige(), eerste() and laatste(), (Dutch for next, previous, first, last)
If one of the fields in a retrieved record contains an extended Ascii character (see my initial posting) the PHP class stops functioning.
For example if the name-field contains the name Aïda or René then the problem occurs, because of the the  "ï" and "é"


The class:


<?php


/**********

Fields in the database:

ID
user
password
userlevel
voornaam
achternaam
initialen
straat
postcode
plaats
telefoon
email
haar_naam
zijn_profiel
haar_profiel
burgerlijke_staat
beroep
branche
titel
fax_prive
mobiel
adres_zakelijk
telefoon_zakelijk
fax_zakelijk
email_zakelijk
foto_zijn
foto_haar

***********/

/*************************************************************************
 Zaken die veranderd moeten worden voor een andere server/directory:

 -> In de as file: setDefaultGatewayUrl
 -> database gegevens in de PHP classfile, user etc
 -> eventueel het aanroepen van de scripts in de flash zelf
 -> flash opnieuw compileren


***************************************************************************/



      class facetoface_class
      {

  var $story = "TEST";

/* LOCAL: */
  var $table_name      = "leden";
  var $Host           = "localhost"; // Hostname of our MySQL server.
  var $Database       = "audio5"; // Logical database name on that server.
  var $User           = "root"; // User und Password for login.
  var $Password       = "";


/* REMOTE
  var $table_name      = "leden";
  var $Host           = "*******"; // Hostname of our MySQL server.
  var $Database       = "audio5"; // Logical database name on that server.
  var $User           = "audio5"; // User und Password for login.
  var $Password       = "******";
*/


  var $Query_String = "SELECT ID FROM leden";
  var $connection;  // Result of mysql_connect().
  var $result;  // Result of most recent mysql_query().
  var $Record   = array();  // current mysql_fetch_array()-result.
  var $Row;           // current row number.
  var $msg = "";
  var $Errno    = 0;  // error state of query...
  var $Error    = "";
  var $num = 10;
  var $IDnummer;

// variabelen database fields
  var $ID = 0;
  var $voornaam = "";
  var $achternaam = "";
  var $initialen = "";
  var $straat = "";
  var $postcode = "";
  var $plaats = "";
  var $telefoon = "";
  var $email = "";
  var $haar_naam = "";
  var $zijn_profiel = "";
  var $haar_profiel = "";
  var $burgerlijke_staat = "";
  var $beroep = "";
  var $branche = "";
  var $titel = "";
  var $fax_prive = "";
  var $mobiel = "";
  var $adres_zakelijk = "";
  var $telefoon_zakelijk = "";
  var $fax_zakelijk = "";
  var $email_zakelijk = "";
  var $foto_zijn = "dummy.jpg";
  var $foto_haar = "dummy.jpg";

// samenstellen naam linksboven
  var $naam = "";

  var $rowarray = array();
  var $counter = 0;
  var $rowpointer = 0;
// het bewerkte zakelijk adres
  var $zakelijk_adres = ""; // CrLf vervangen

  var $aantal = 0; //aantal records
  var $CrLf = ""; //
            
  var $portret_dir = "portretten/"; // lokatie van de portretten
  var $dummy = "portretten/dummy.jpg"; // vervangend plaatje als portret ontbreekt

function Foo() {
      $this->init();
}
            
function init() {
      echo "GELUKT!!!\n";
      }

function recordnummer($n){
      $this->nummer = $n;
}
function initDb(){
//$this->rowpointer = 7;

    $this->connect();
    $this->result = mysql_query($this->Query_String,$this->connection);
    $this->Row = 0;
      while (    $this->Record = mysql_fetch_array($this->result)) {
         $this->rowarray[$this->Row ] = $this->Record['ID'];
         $this->Row   += 1;
      }
    $this->aantal = $this->num_rows();
//    mysql_close($this->connection);

    $this->showRecord($this->IDnummer);
    $this->rowpointer = $this->row_num()+1;
   
      
}

  function connect() {
    if ( 0 == $this->connection ) {
      $this->connection=mysql_connect($this->Host, $this->User, $this->Password);
      if (!$this->connection) {
      $this->msg="Link-ID == false, connect failed";
        $this->halt();
      }
      if (!mysql_query(sprintf("use %s",$this->Database),$this->connection)) {
      $this->msg="cannot use database ".$this->Database;
        $this->halt();
      }
    }
  }

/*********************************  lookup functie  ********************/
function showRecord($i) {


    $this->Query_String = "SELECT * FROM leden where ID = ".$i;
    $this->connect();
    $this->result = mysql_query($this->Query_String,$this->connection);
    $this->Record = mysql_fetch_array($this->result);
            $this->ID = $this->Record['ID'];
            $this->voornaam = $this->Record['voornaam'];
            $this->achternaam = $this->Record['achternaam'];
            $this->initialen = $this->Record['initialen'];
            $this->straat = $this->Record['straat'];
            $this->postcode = $this->Record['postcode'];
            $this->plaats = $this->Record['plaats'];
            $this->telefoon = $this->Record['telefoon'];
            $this->email = $this->Record['email'];
            $this->haar_naam = $this->Record['haar_naam'];
            $this->zijn_profiel = $this->Record['zijn_profiel'];
            $this->haar_profiel = $this->Record['haar_profiel'];
            $this->burgerlijke_staat = $this->Record['burgerlijke_staat'];
            $this->beroep = $this->Record['beroep'];
            $this->branche = $this->Record['branche'];
            $this->titel = $this->Record['titel'];
            $this->fax_prive = $this->Record['fax_prive'];
            $this->mobiel = $this->Record['mobiel'];
            $this->adres_zakelijk = $this->Record['adres_zakelijk'];
            $this->telefoon_zakelijk = $this->Record['telefoon_zakelijk'];
            $this->fax_zakelijk = $this->Record['fax_zakelijk'];
            $this->email_zakelijk = $this->Record['email_zakelijk'];
      mysql_close($this->connection);
      $this->naam = $this->achternaam.", ";
      $this->naam .= $this->initialen;

      // CrLf in adresvervangen door "\n"
      $this->CrLf .= chr(13);
      $this->CrLf .= chr(10);
      $this->zakelijk_adres = str_replace($this->CrLf, "\n", $this->adres_zakelijk);

      // naam en lokatie van de plaatjes
      $this->portret_base = $this->portret_dir;
      $this->portret_base .= "img".$this->ID; // eerste deel van plaatjesnaam
      
      $this->foto_zijn = $this->portret_base."a.jpg";
      if (!is_file ( $this->foto_zijn )){
            $this->foto_zijn = $this->dummy;
      }
      $this->foto_haar = $this->portret_base."b.jpg";
      if (!is_file ( $this->foto_haar )){
            $this->foto_haar = $this->dummy;


      }
// Just for testing::

/*
      echo "local variabe IDnummer = ".$this->IDnummer;
      echo "\nTEST2\n".$this->portret_base."a.jpg\n";
      //echo "aantal records: ".count($this->rowarray)."\n";
      echo "Aantal records: ".$this->aantal."\n";
      echo "row number : ";
      echo $this->row_num()+1;
      echo "\nID = ".$this->ID;
      echo "\n ID behorender bij ".$this->IDnummer." : ".$this->rowarray[$this->row_num()];
*/
}

function showarray(){ //for testing
      for ($i=0;$i<count($this->rowarray);$i++) {
            echo $i;
            echo " ID: ";
            echo $this->rowarray[$i];
            echo "\n";
      }
}



  function row_num(){ // row number ophalen
      for ($rn=0;$rn<count($this->rowarray);$rn++) {
            if ($this->rowarray[$rn] == $this->ID){
                     $myRow =  $rn;
                  return $myRow;
                  break;
            }
      }
//      return $myRow;
  }


  function seek($pos) {
    $status = mysql_data_seek($this->result, $pos);
    if ($status)
      $this->Row = $pos;
    return;
  }

  function num_rows() {
    return mysql_num_rows($this->result);
  }

  function num_fields() {
    return mysql_num_fields($this->result);
  }

  function f($Name) {
    return $this->Record[$Name];
  }

  function p($Name) {
    print $this->Record[$Name];
  }

  function affected_rows() {
    return @mysql_affected_rows($this->connection);
  }




            function volgende() { //next record
                  if ($this->rowpointer < $this->aantal){
                        $this->rowpointer += 1;
                        $this->IDnummer = $this->rowarray[$this->rowpointer - 1];
                        echo"Volgende rownummer = $this->rowpointer\n";
                        $this->showRecord($this->IDnummer);
                  }


            }

            function vorige() {//previous record
                  if ($this->rowpointer > 1){
                  $this->rowpointer -= 1;
                  $this->IDnummer = $this->rowarray[$this->rowpointer-1];
                  $this->showRecord($this->IDnummer);
                  }
            }

            function eerste() {//first record
                  //echo "DE EERSTE\n";
                  $this->IDnummer = $this->rowarray[0];
                  $this->showRecord($this->IDnummer);
                  $this->rowpointer =1;
            }

            function laatste() {//last record
                  //echo "LAATSTE\n";
                  $this->IDnummer = $this->rowarray[$this->aantal-1];
                  $this->showRecord($this->IDnummer);
                  $this->rowpointer =$this->aantal;
            }
      }
            
?>

 

by: VGRPosted on 2003-10-05 at 02:41:46ID: 9493947

I think it's a Flash problem  with the charset used in the DB data

 

by: AlwinPosted on 2003-10-05 at 05:43:58ID: 9494169

Hi VGR,

Why do you think it is a Flash problem?
The characters are being displayed correctly by the Flash.

 

by: VGRPosted on 2003-10-05 at 06:06:43ID: 9494218

and your class seems more than OK

and you DB seems more than able to store the accents

so...

what happens exactly ?

this is not acceptable : "I Mean the whole script is being executed allright after the mysql_fetch_array() command, but next time the the PHP-class is called upon it does not function anymore."

I'm sure there is an error somewhere, in error.log, in my.err, whatever

couldn't you execute the same code the flash object executes, but from PHP ? Just to see if it works...

 

by: AlwinPosted on 2003-10-05 at 07:38:09ID: 9494460

As long as records are being retrieved where none of the fields contain those "bad" characters, the Flash functions flawless.
Executing from the same code fro PHP gives no problem, because in that case the page / script is being reloaded each time.
Here is the URL:

http://www.audiovisueel.com/members/ledenlijst/ledenlijst.php (user = "lchoevelaken" password = "support")

It is a memberlist. Clicking on the small face at the right shows the details of that member.
When the Flash, with those details, is open, I want to be able to navigate with the buttons at the bottom.
But nearly all the records contain "bad" characters.

Some records without problems:
The first: Erik Batstra
Alwin Bijvoet (that's me)
Arend de Nooij

Hans Stad, (there you can go up and down, because these records do not contain all data yet.)

It's a great mystery to me.



 

by: VGRPosted on 2003-10-05 at 08:38:27ID: 9494647

NB : the label on the faces is always "smeolenboek ben"

 

by: VGRPosted on 2003-10-05 at 08:41:42ID: 9494658

true : the flash stops working after a while, but I don't see a single person in your list having accents naywhere

which kind of code is in the SWF ?

 

by: VGRPosted on 2003-10-05 at 08:44:53ID: 9494665

for instance it blocks on Beeres, M.P.J. while I don't see any "fancy " character in there. But I see a ` quote

perhaps you've a string escaping problem while in the Flash.

It would be necessary to look at Flash's code towards PHP, and how the SWF displays the data

 

by: AlwinPosted on 2003-10-05 at 09:18:41ID: 9494752

Well, if you look at "Alec Bergsma" you will see under Branche:  "industriële drukkerijen" , others have "financiële".

The labels I don't understand. With me I see "Smoelenboek <firstname> ", so it changes wit each line.
If you look at the source you see at each record something like onmouseover="showTip('Smoelenboek Jacob');
Those values come from the database.

SWF compiled for Flashplayer 6.

 

by: AlwinPosted on 2003-10-05 at 09:26:51ID: 9494769

The code from the Flash:



tmp = new PHPObject();
tmp.setDefaultGatewayKey("secret");
tmp.setDefaultGatewayUrl("http://www.audiovisueel.com/members/facetoface/Gateway.php");
delete tmp;
myFoo = new PHPObject("facetoface_class");

// **************************
// event handlers
// **************************
myFoo.onInit = function() {
      this.IDnummer = _root.recno;
        myFoo.initDb();



     months = new Array('Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September',                    'October',  'November', 'December');
     days = new Array('Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag');
     now = new Date();
     todayDate = now.getDate();
     thisDay = now.getDay();
     thisMonth = now.getMonth();
     thisYear = now.getFullYear();
     dayName = days[thisDay];
     monthName = months[thisMonth];
     datum_txt.text = todayDate + " " + monthName + " " + thisYear;
}

myFoo.onAbort = function() {

}

myFoo.onResult = function() {

 naam_txt.text = this.naam;
 adres_prive = this.straat + "\n" + this.postcode + "  " + this.plaats;
 adres_prive_txt.text = adres_prive;

 telefoon_txt.text = this.telefoon;
 email_txt.text = this.email;
 haar_naam_txt.text = this.haar_naam;
 zijn_profiel_txt.text = this.zijn_profiel;
 haar_profiel_txt.text = this.haar_profiel;

 burgerlijke_staat_txt.text = this.burgerlijke_staat;
 beroep_txt.text = this.beroep;
 branche_txt.text = this.branche;
 titel_txt.text = this.titel;
 fax_prive_txt.text = this.fax_prive;
 mobiel_txt.text = this.mobiel;
 adres_zakelijk_txt.text = this.zakelijk_adres;
 telefoon_zakelijk_txt.text = this.telefoon_zakelijk;
 fax_zakelijk_txt.text = this.fax_zakelijk;
 email_zakelijk_txt.text = this.email_zakelijk;

 num_txt.text = this.rowpointer;
 id_txt.text = this.IDnummer;

 loadMovie(this.foto_zijn, linkerfoto)
 loadMovie(this.foto_haar, rechterfoto);
}


// **************************
// button triggers
// **************************

_root.eerste_btn.onRelease = function() {
            myFoo.eerste();
}

_root.vorige_btn.onRelease = function() {
            myFoo.vorige();
}

_root.volgende_btn.onRelease = function() {
            myFoo.volgende();
}

_root.laatste_btn.onRelease = function() {
            myFoo.laatste();
}

 

by: AlwinPosted on 2003-10-05 at 09:35:42ID: 9494806

Yes, the trouble with Beeres was caused by the quote character. I replaced it with ' (ascii 39) and now Beeres is OK.
The quote character was pasted from a word document.

 

by: VGRPosted on 2003-10-05 at 12:25:39ID: 9495278

this proves it's Flash having problems displaying the text.. I'll look at your SWF code. Give me soem time ;-)

 

by: VGRPosted on 2003-10-05 at 12:37:35ID: 9495312

well, it's the facetoface_class that would be interesting, but I found some data :

http://www-tcsn.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20660922.html

perhaps you should urlencode() the text gotten from MySql... accents will become %E9 or the like

look also at this code I found :

onLoad(){
str = String.fromCharCode(233);
trace(str);   // returns the string "é"
}

 

by: dutchfoxerPosted on 2003-10-05 at 14:27:15ID: 9495611

You can try this.... in flash put the following actionscript line on top of all actions:

System.useCodepage = true;

The other alternative is to let PHP convert the special characters.

(ik hoop dat het werkt)

 

by: AlwinPosted on 2003-10-06 at 00:48:54ID: 9496836

Hi,

dutchfoxer:
Unfortunately the System.useCodepage directive does not work.
On my local machine (winXP) the PHP class is not being blocked anymore, but the text shows unpredictable results.
Remote (Unix) PHP keeps blocking and the strange characters show too.
jammer!

VGR:
The problem occurs when the mysql_fetch_array() function is being executed.
So things go wrong before being able to manipulate the retrieved result.
Thanks anyway for spending so much time on my problem on Sunday!



 

by: VGRPosted on 2003-10-06 at 11:16:01ID: 9499908

it can't be the fetch_array()... It must be the internals of Flash - I don't knwo them - that process that result set...

 

by: AlwinPosted on 2003-10-06 at 22:52:40ID: 9503468

Hi VGR,

In the showrecord() function: if I comment out everything after mysql_fetch_array(), things still go wrong.
So the error is not being caused in the lines after mysql_fetch_array().
If I comment out (you know what I mean: /* ... */) the mysql_fetch_array() line too, there is no problem anymore.
Hence my conclusion that mysql_fetch_array() is the critical line.



 

by: VGRPosted on 2003-10-07 at 11:08:52ID: 9507735

yes but no. You said that teh same code executed in PHP produces no error... Thus it HAS to do something with Flash or Flash's way of calling MySql...

 

by: AlwinPosted on 2003-10-07 at 11:36:01ID: 9507982

The strange thing is that the PHP class is working outside the Flash and is only passing data to Flash
After the mysql_fetch_array() function  has been executed, nothing is being passed to the Flash yet.
But nevertheless no functions inside the PHP Class can be executed afterwards.

Do you know par hasard a different PHP/mysql code to retrieve data from a database?

 

by: VGRPosted on 2003-10-07 at 12:09:11ID: 9508333

well, it's just the best way...

you could use the non-associative way... mysql_getresult() or something

 

by: AlwinPosted on 2003-10-07 at 12:16:44ID: 9508394

I will try something else, but in the weekend.
I have put links to this question in the Flash- and PHP- areas but no reactions so far.
So this problem stays unsolved.

Thanks for your support!

 

by: VGRPosted on 2003-10-07 at 12:31:05ID: 9508502

too bad I don't know anything about Flash :D

 

by: AlwinPosted on 2003-10-07 at 12:38:44ID: 9508554

Never too old to learn ;-) (I'm 64 you saw my picture)

 

by: VGRPosted on 2003-10-07 at 14:38:09ID: 9509398

well, I'm already too old to fall into the .Net or SWF traps :D

 

by: kanaryPosted on 2003-10-08 at 01:37:42ID: 9511954

hello Alwin,

open the php file using notepad
save as the file and then choose utf-8 or unicode from the encoding option.

now try...

kanary.

 

by: AlwinPosted on 2003-10-08 at 02:32:54ID: 9512148

Hi kanary, VGR,

The PHP class only functions when saved as ANSI.

I have the idea that problems will be solved when data are stored in utf-8 or unicode in the database but I don't know the routines needed for that and how to go about at retrieval of the data from the database.

 

by: kanaryPosted on 2003-10-08 at 02:39:13ID: 9512173

Alwin,

im sorry but flash doesnl not read unicode data from asp, php, cfm,... unless the files r saved using unicode encoding.

and in flash the dynamic textfield fonts should be set to a font that can render the language u r using.

im pulling arabic data from Sql data with asp and preview it in flash with no problems.

also the data should be stored in the database as unicode language, in SQL server the datatype should be nvarchar and the collasion type should be set the language u r using.

hope this helps,
kanary.

 

by: AlwinPosted on 2003-10-08 at 03:06:58ID: 9512269

Thanks kanary,

How do I store data as unicode in MySql database?
I think the nvarchar datatype is SQL server specific? In MySql I used varchar and don't know nvarchar.
What is collasion type? (Dumb question?)

Unfortunately I am leaving now and no be back before monday.
Monday I will read your answer.

Alwin

 

by: CalronPosted on 2003-10-10 at 08:23:53ID: 9528298

I have had the same problem when getting text to flash, though my main problem was spanish text using the é, ñ etc. characters. What worked for me was to add this line to the php before sending the text to flash:

$text = utf8_encode($text);


Once I did that the special characters were all transimtted ok. Try it out, it might not work for all cases, but it worked in my case with the characters I needed.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...