• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying Chinese data in html

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This question pertains to PLSQL Web Applications.

I'm trying to display some Chinese data on a html page. The data is stored as CLOB in the Oracle database. This piece of code works fine for English data, but for Chinese data it displays upside down question marks. I'm sure it is an encoding issue, but I don't know how to resolve it. Can anybody help me please.

=====================================================
stem clob;
begin
select v.xtext.getClobVal()
into stem
from item_text v
where item_identifier = 31784;

htp.print('<html>');
htp.print('<head>');
htp.print('<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>');
htp.print('<meta http-equiv="Content-Language" content="zh">');
htp.print('</head>');
htp.print('<body>');
htp.print('you have reached the chinese page !!');
htp.print(stem);
htp.print('</body></html>');
end;
===================================

Also when I run the below statement in iSQLPLus, I'm able to get the correct Chinese data.

select v.xtext
from item_text v
where item_identifier = 31784;

Thanks
-S
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start by reading this article.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic