cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Campi <and...@webcom.it>
Subject ESQL + UTF8
Date Thu, 14 Dec 2000 21:44:28 GMT
Hi!

I have a problem I could not solve by just R-ing the FM and the ML archives...

I created a simple mysql DB which will store messages entered via a web form. I
also have created an XML page that uses esql to extract data from it and show
in tabular format. Everything is fine, but when I put UTF8 encoded data in it,
I start getting bogus characters out of it. To explain better: I am italian, so
I need to support accented vowels. An accented `o', corresponding to &ograve;
(or &acute, but doesn't really matter) is encoded as \xc3\xb2. When I put this
text in an XML file, say:

<?xml version="1.0"?>
<?cocoon-format type="text/html"?>
<page>
	<message>
		<msgbody>
			ci\xc3\xb2
		</msgbody>
	</message>
</page>

is shown properly. Adding an XSL like this:

<?xml version="1.0" encoding="iso-8859-1"?>
[...]

is no problem, nor it is using XSP processing. As soon as I put that string in
the DB and extract it using esql, it starts to show like 2 different chars no
matter if I use get-string or get-xml...

Sorry if I was a little bit verbose, but I wanted to make my issue very clear.
I have tried everything including different combinations of CDATA etc... I have
no idea how to fix this. I have even thought of converting everything to 8 bit
chars before insert into the DB but it looks like a not small effort.

Is there any way to do what I need? Or failing that, what would you recommend?
As a second option, I would try forcing the browser not to send UTF, playing
around with Accept headers, but I'd be happier to avoid that...

By the way, if you want to have a look, the whole point is to implement a sort
of guestbook. You can have a look at http://www.webcom.it/bacheca/ .

TIA, bye,
	Andrea




-- 
Failure is not an option. It comes bundled with your Microsoft product.

Mime
View raw message