Re: Problem with special char in MySQL and XML [message #174848 is a reply to message #174847] |
Wed, 13 July 2011 12:37 |
alvaro.NOSPAMTHANX
Messages: 277 Registered: September 2010
Karma:
|
Senior Member |
|
|
El 13/07/2011 14:17, Sarah escribió/wrote:
> I try to resume, for try to find my error.
>
> I've a DB with UTF_8 encode
Right. The "U" in UTF-8 stands for "Unicode": that means that you can
store almost everything, including Chinese characters if you want.
> I've saved char as& è à ' ì
> is this OK?? Or Do I've save char with this ecode&(space)amp;
> etcc....??? I mean: can I use è à ò ù& in my UTF_8 DB Table???
These ("á", "&", "Ñ"...) are called HTML entities. They
are used in HTML (and, if I'm not wrong, also in XML). But they have
absolutely no direct relation with MySQL or relational databases.
Whatever book or tutorial you read that suggested so is a piece of junk.
> Now I've to read from table and show results in XML. Do I've to change
> results that I've in DB, or keep in my format?
I suppose you can apply the exact steps I told you and see what happens.
I can't answer that unless you explain what "format" means for you in
this context. If you mean "encoding", changing it to something that's
not UTF-8 will only make things harder. A general rule for programming
and life: do something when you have a reason to.
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
|
|
|