Re: Printing extended ascii

From: De DBA <dedba_at_tpg.com.au>
Date: Thu, 25 Mar 2010 11:36:24 +1000
Message-ID: <4BAABE18.2070605_at_tpg.com.au>



I tried again, just to be sure, but no. My database is 10.2.0.4 for MAC/OSX, NLS_LANG=AMERICAN.AMERICA-WE8ISO8895P1, the terminal is capable of displaying the plus-minus sign (perl can do it..) but SQL*Plus stubbornly refuses.

Perhaps this differs between platforms. The OP uses SQL*Plus on SUN and fails, I tried on MAC/OSX, fails too? My MAC/OSX terminal says it behaves like an xterm-color. Sun's gnome-terminal should also behave that way, I believe.

Cheers,
Tony

On 25/03/10 11:06 AM, Bobak, Mark wrote:
> Works for me in SQL*Plus, but you need to consider the database character set and the value of NLS_LANG, as well as the capability of your terminal.
>
> If I don't have NLS_LANG set, I get the upside down question mark. If I set NLS_LANG to the database character set, then SQL*Plus doesn't attempt to do any kind of translation, and I get the plus/minus sign, "". Assuming your terminal program is actually capable of displaying it, you should be able to do the same.
>
> -Mark
>
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of De DBA
> Sent: Wednesday, March 24, 2010 8:54 PM
> To: gabriel.aragon_at_ge.com
> Cc: oracle list
> Subject: Re: Printing extended ascii
>
> Hi Gabriel,
>
> It seems to be a limitation of sql*plus. Some testing on my mac shows
> that even if the terminal encoding is set to ASCII and something like:
>
> $ perl -e 'print chr(177)'
>
> prints the expected plus-minus sign, a
>
> SQL> select chr(177) from dual;
>
> still displays the unwanted question mark. However the same query
> executed in tOra does return the plus-minus sign.
>
> If that's correct you have 2 options: execute your query in a goowee
> tool or use ASCII art (_-=+><) instead.
>
> Cheers,
> Tony
>
> On 25/03/10 4:58 AM, Aragon, Gabriel (GE, Corporate, consultant) wrote:
>> Hi list,
>> is there any way to print extended ascii? Let's say Im trying to make a
>> bar graph like:
>> select
>> ....., '|'||rpad(fieldn,30,'X')||'|'
>> from
>> ...
>> to display something like:
>> field1 field2 ... |XXXXXXXXXX|
>> but I want to replace the X for the square character, I think is ascii
>> 176, 177, 178 or 219 but cant process ascii code besides 126. Is it
>> possible to do this?
>> 10.2.0.4
>> Sun
>> UTF8
>> TIA
>> *Gabriel *
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 24 2010 - 20:36:24 CDT

Original text of this message