Re: Special Characters in SQLPlus?

From: DanHW <danhw_at_aol.com>
Date: 27 Apr 1999 01:17:24 GMT
Message-ID: <19990426211724.08426.00001949_at_ng94.aol.com>


>I have some setup tables that a program of mine loads data from, and I need
>to
>put some special characters (e.g. one that shows up in a TT font as the
>"cross
>of lorraine") into some varchar2 columns in them.
>
>I know the database / tables will handle them, as I can input the data via my
>program (using RogueWave's DBTools) and the chars go in and come out just
>fine.
>
>However, when I enter them via SQLPlus or SQL Worksheet, they get replaced by
>question marks. :-(
>
>I will write a special program to provide UI for configuration, if I have to,
>but I'd rather just use a generic data-entry tool. Are there any that will
>work with these special characters, or is there something special I can do to
>SQLPlus or SQL Worksheet that will make them accept these?
>
>TIA for any ideas or leads ...
>
>Brett Stonier
>bretts_at_sight-n-sound.com
>Software Engineer
>Sight & Sound Software, Inc.
>

There are 2 options, depending on what you are doing...

In a SQL select, whenever you need the escape, use CHR(27) [doublecheck on that - it might be CHAR]. This Oracle character function returns the character with the requested ASCII value.

The other option also works in prompts and headers etc. Use something like this:
COLUMN esc newvalue esc
select chr(27) esc from dual;

The you can use it anywhere by referencing &&esc.

I used this several years ago; hopefully my memory is reasonably accurate.

I seem to recall that there were problems keeping the columns lined up because SQLPLUS thought &&escTitle is 8 characters long,, not 5. This is especially troblesome if you are setting fonts,printing characters and resetting fonts.

Hope this helps.

Dan Hekimian-Williams Received on Tue Apr 27 1999 - 03:17:24 CEST

Original text of this message