Re: PHP, XML, UTF-8

From: Date: Thu, 11 Dec 2003 15:49:13 +0000
Subject: Re: PHP, XML, UTF-8
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-172482@lists.php.net to get a copy of this message
Answer: Multi-Byte String Functions. You could take a look at the function: string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding] ) You must have php_mbstring extension enabled in your php.ini file. Regards, Lucian COZMA "Russell P Jones" <rjones@email.unc.edu> wrote in message news:Pine.A41.4.44+UNC.0312081334320.59572-100000@login7.isis.unc.edu... > Im storing a lot of user-entered data in XML files but i have a problem > with folks submitting stuff just by copying and pasting from microsoft > word. "Smart Quotes" and other awkward text then gets submitted and ruins > the xml, meaning i am searching and replacing item by item to replace > stuff. > > Does anyone know how I could do this automatically, as in is there > anything that will convert a string to UTF-8 automatically > > ideally $fixed = convert-to-utf($oldmessedupstring) > > any ideas? Will CDATA sections allow non UTF-8 text? > > Russ Jones

« previous php.general (#172482) next »