Re: Generating html page in UTF-8

From: Gunnar Hjalmarsson <noreply_at_gunnar.cc>
Date: Tue, 17 Feb 2009 12:16:32 +0100
Message-ID: <6vvkgvFm6q02U1_at_mid.individual.net>



dn.perl_at_gmail.com wrote:
> I am using a myscript.cgi, written in Perl, to query an Oracle table,
> and display a few fields in a browser. One field is of the type LONG
> or CLOB, depending on which Oracle Server I am querying. If I run the
> "select myfield from mytable" command from a Windows Oracle client, I
> can see the field correctly. If I run the same command within 'sqlplus
> user/password' session within FreeBSD, the text of the CLOB field is
> not shown correctly.
>
> I think the problem is two-fold. I am now passing (hopefully) the
> correct ora_charset to DBI->connect ("db-details", "user",
> "password" , {ora_charset => correct_set}). But the browser still
> would not show the field correctly. I wonder whether I need to specify
> a parameter like 'ora_charset' to the 'encoding type' for the html
> page, and whether some library like 'use utf-8' is available which
> will help solve the issue. If there is any CLPerlM forum FAQ which
> addresses the issue, please do point me to it, and I shall be
> thankful.

When generating the HTML page, myscript.cgi needs to print the correct content-type header with charset=UTF-8.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Received on Tue Feb 17 2009 - 05:16:32 CST

Original text of this message