Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Outputting data in UTF-8
In article <MPG.1ca3652d693e396a989dda_at_news.individual.net>, Jeremy
says...
> We are sending XML to a 3rd party on request and this is being delivered
> from a 9iR2 database running on Solaris and using Oracle HTTP server and
> mod_plsql.
>
> The 3rd party has told us that the data should be in UTF-8 encoding
> instead of ISO-8859-1
>
> I had assumed (naively it appears) that simply setting the http headers
> and document declaration e.g.:
>
> owa_util.mime_header('text/xml; charset=UTF-8', false);
> owa_util.http_header_close;
> htp.p('<?xml version="1.0" encoding="UTF-8"?>');
>
>
> would be sufficient however when looking in e.g. firefox at the document
> details it still says that the encoidng is ISO-8859-1
>
> So the question is: how can I generate the data using the requested
> encoding?
>
> Is there an 'alter session' directive I can use?
>
> Thanks.....
>
>
Bad form etc but I'll reply to my own post to show the solution that we used....
We edited the dads.conf file to create a new DAD with the following definition:
<Location /utf8>
SetHandler pls_handler Order deny,allow Allow from all AllowOverride None PlsqlDatabaseUsername xxxxxxxxx PlsqlDatabasePassword yyyyyyyyy PlsqlDatabaseConnectString netdev9i PlsqlAuthenticationMode Basic PlsqlNLSLanguage AMERICAN_AMERICA.UTF8</Location>
And that seems to have done the trick. Opening the XML documents we generate show them to be UTF-8 encoded so I think it's smiles all round.
-- jeremyReceived on Fri Mar 18 2005 - 06:01:13 CST
![]() |
![]() |