Connecting Tech Pros Worldwide Help | Site Map

transform text

  #1  
Old July 17th, 2005, 05:57 AM
alain dhaene
Guest
 
Posts: n/a
HI,

I retrieve data from a text box. I store this in a mysql db and later I
retrieve the data and make a xml-format.

This works but when I put characters such as é I have problems to make the
xml-format.

Is there a way to transform the text from the text box in a ascii format and
then store this in the db?

thx,

Alain


  #2  
Old July 17th, 2005, 05:57 AM
Berislav Lopac
Guest
 
Posts: n/a

re: transform text


alain dhaene wrote:[color=blue]
> HI,
>
> I retrieve data from a text box. I store this in a mysql db and later
> I retrieve the data and make a xml-format.
>
> This works but when I put characters such as é I have problems to
> make the xml-format.
>
> Is there a way to transform the text from the text box in a ascii
> format and then store this in the db?[/color]

You need to specify the encoding in the XML file.

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.


  #3  
Old July 17th, 2005, 05:57 AM
Tony Marston
Guest
 
Posts: n/a

re: transform text


If you are using PHP's XML DOM functions to create your XML data then take a
look at http://www.tonymarston.co.uk/php-mys...tml#multi-byte which
explains how to deal with multi-byte character sets.

--
Tony Marston

http://www.tonymarston.net


"alain dhaene" <a.dhaene@instruct.be> wrote in message
news:4088e454$0$10826$a0ced6e1@news.skynet.be...[color=blue]
> HI,
>
> I retrieve data from a text box. I store this in a mysql db and later I
> retrieve the data and make a xml-format.
>
> This works but when I put characters such as é I have problems to make[/color]
the[color=blue]
> xml-format.
>
> Is there a way to transform the text from the text box in a ascii format[/color]
and[color=blue]
> then store this in the db?
>
> thx,
>
> Alain
>
>[/color]


  #4  
Old July 17th, 2005, 05:57 AM
Chung Leong
Guest
 
Posts: n/a

re: transform text


"alain dhaene" <a.dhaene@instruct.be> wrote in message
news:4088e454$0$10826$a0ced6e1@news.skynet.be...[color=blue]
> HI,
>
> I retrieve data from a text box. I store this in a mysql db and later I
> retrieve the data and make a xml-format.
>
> This works but when I put characters such as é I have problems to make[/color]
the[color=blue]
> xml-format.
>
> Is there a way to transform the text from the text box in a ascii format[/color]
and[color=blue]
> then store this in the db?[/color]

UTF-8 is the preferred method of encoding character data in XML. Pass the
text through utf8_encode() before you place it into the XML file.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make XslCompiledTransform transform &amps; as XslTransform does InvalidLastName answers 12 November 7th, 2006 07:35 AM
Changing Text evanburen@gmail.com answers 10 March 13th, 2006 02:55 AM
Xslt transform in code yields nothing Andy answers 3 November 12th, 2005 05:09 AM
Multiple External References in Transfom Stephen Cook answers 6 November 12th, 2005 02:07 AM