By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,748 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,748 IT Pros & Developers. It's quick & easy.

transform text

P: 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
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
alain dhaene wrote:
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?


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.
Jul 17 '05 #2

P: n/a
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.******@instruct.be> wrote in message
news:40***********************@news.skynet.be...
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

Jul 17 '05 #3

P: n/a
"alain dhaene" <a.******@instruct.be> wrote in message
news:40***********************@news.skynet.be...
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?


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.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.