Code to retrieve dbms_output has problems with unicode characters

The following code leads to an exception if “Automatically poll for output after execution” is enabled:

BEGIN
dbms_output.put_line( LPAD( ‘:radioactive:’, 10000, ‘:radioactive:’ ) );
dbms_output.put_line( LPAD( ‘:radioactive:’, 10000, ‘:radioactive:’ ) );
END;

Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 39

I guess you should use LENGTHB instead of LENGTH for the checks.

This has been logged.

Thanks,

Michael

Fixed for next beta.