| HTP Package in UTf8 [message #318415] |
Tue, 06 May 2008 16:15  |
amber.jah Messages: 1 Registered: May 2008 |
Junior Member |
|
|
Hi,
I am trying to execute this code:
begin
-- Initialize owa with an empty array, just so we can use htp.
owa.init_cgi_env( param_val=>owa.cgi_var_name );
-- Add a header to avoid dealing with header-related code in htp.
htp.prn('Content-Type:text/plain');
htp.print('');
-- Add padding to get a total number of rows >= pack_after (60)
-- See the source of SYS.htp for details on pack_after.
for n in 1 .. 58 loop
htp.print('x');
end loop;
-- Now whatever we prn() goes into htp.htcurline, which is defined as
-- VARCHAR2(255)
-- Note: This means 255 BYTES by default, since NLS_LENGTH_SEMANTICS
-- has a default value of 'BYTE'.
-- Start with 242 characters/bytes.
htp.prn(rpad('x',242,'x'));
-- There is now room left for 13 bytes.
-- Add 4 characters / 12 bytes.
-- Note: characters are 4 UTF-8 encoded Tamil language characters.
htp.prn(utl_raw.cast_to_varchar2('E0AEA4E0AEAEE0AEBFE0AEB4'));
-- There is now room for (13-12=) 1 more byte. But htp thinks there is
-- room for (13-4=) 9 more, since it used length().
-- Adding 3 characters/bytes causes ORA-06502: PL/SQL: numeric or value
-- error: character string buffer too small
htp.prn('xxx');
end;
/
The error I am getting is
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.HTP", line 1550
ORA-06512: at line 32
what i feel is that oracle Database UTF8 or AL32UTF8 characterset does not support htp package properly. When i run the code on another characterset, it runs errorfree except in UTF8 or AL32UTF8.
Is there any way to remove this problem?
|
|
|
| Re: HTP Package in UTf8 [message #318560 is a reply to message #318415 ] |
Wed, 07 May 2008 03:13  |
JRowbottom Messages: 2663 Registered: June 2006 Location: Sunny North Yorkshire, ho... |
Senior Member |
|
|
|
This sounds like one for the Oracle Support guys at Metalink.
|
|
|