Toad World® Forums

ASCII characters appearing on DBMS Output

Since 13.2, certain ascii characters have started to appear in the DBMS_Output window. For instance:

Begin
Dbms_output.Put_Line( '1' );
Dbms_output.Put_Line( Chr(12) );
Dbms_output.Put_Line( '2' );
End;

Pre 13.2, the out put would look like this:
1

2

but now it looks like this:
1
FF
2

If I use chr(10) or chr(13) in place of chr(12), I don't get any symbols (LF or CR) but I get 2 line breaks instead.

I can't seem to find an option to turn this off - is it a bug or intended functionality?

Thanks,

Mark.

Hi Mark,

This is due to a bug fix within Toad and is intended functionality. In previous versions of Toad, certain non-alphanumeric ASCII characters (e.g. those lower than 0x20h or CHR(32)) that were referenced in scripts caused errors to be displayed when executed within Toad; however, those scripts worked correctly within SQL*Plus and displayed a non-printable character symbol where used. For example, consider the following script:

select '1' from dual;
select chr(27) from dual;
select '2' from dual;

When executed in Toad 13.1 and earlier, an error would be displayed about an invalid character being found in text content; however, executing this through SQL*Plus displayed the following:

In Toad 13.2, the above script can be executed within Toad and displays the non-alphanumeric character based on its ASCII representation:

In your script's case, what's being shown is the form feed character in its ASCII representation:

toadbeta

which is more inline with what SQL*Plus displays when executed through it:

The actual character is what's attempting to be displayed even though SQL*Plus and Toad render the character slightly differently. Unfortunately, there's not currently a way to turn this option off as it was intended to make sure Toad behaved like SQL*Plus.

-John

Hi John,

Thanks for the explanation but I've got to say that showing the characters really makes the output look ugly! Also, I tried SQLPlus in unix and I don't see the characters - it behaves exactly as I would like - a form feed acting like a form feed. It only seems to show them when using SQLPlus in Windows.


Is there no way it can be made an option (maybe specific to the DBMS Output window) to show or hide non-alphanumeric ASCII characters?

Thanks,
Mark.