Connecting Tech Pros Worldwide Help | Site Map

transform text

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 04:57 AM
alain dhaene
Guest
 
Posts: n/a
Default transform text

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, 04:57 AM
Berislav Lopac
Guest
 
Posts: n/a
Default 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, 04:57 AM
Tony Marston
Guest
 
Posts: n/a
Default 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, 04:57 AM
Chung Leong
Guest
 
Posts: n/a
Default 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.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.