5 Replies Latest reply on Apr 27, 2016 3:22 PM by @c*689064*

    encoding for skript output panel

    @c*689064*

      Hello!

       

      Where can I set the encoding for the skript output panel?

       

      By executing a SQL statement with F9 and watching the result in the grid, all charakters are shown correctly.

      But by executing a skript with F5 and looking at the result in the skript output panel some chars are displayed incorretly.

       

      Thanx for helping....

       

      @Chris

        • 1. Re: encoding for skript output panel
          thatJeffSmith-Oracle

          can you share an example, say SELECT funnyChars from dual:

           

          You basically just set a code editor display font, and that should take care of it. What's weird in your scenario is that the font there is the same for the grid results AND the script output, so it should display the same way in both.

          1 person found this helpful
          • 2. Re: encoding for skript output panel
            @c*689064*

            Ok, here some example code...

             

            create a procedure...

             

            create or replace procedure adm_mist as

            begin

              null;

              --just comment chars öäü ÖÄÜ §$%&

            end adm_mist;


            take this script...


            --------------------------------------------------------------------------------

            --------------------------------------------------------------------------------

            --------------------------------------------------------------------------------

            --Vergleiche die Objekte je Projekt von brzentw0a, brztest0a und brzprod0a

            --------------------------------------------------------------------------------

            --------------------------------------------------------------------------------

            --------------------------------------------------------------------------------

            clear screen;

            set echo off;

            set verify off;

            --show all;

            --show pagesize;

            set pagesize 50000;

            --set define off;

            set define on;

            define p_Projekt='Administration';

            define p_Formatierung=/*ansiconsole*/;

            define p_Quelle_DB='brztest0a';

            define p_Ziel_DB  ='brzprod0a';

            prompt --------------------------------------------------------------------------------;

            select 'öäü ÖÄÜ §$%&;' from dual;

            prompt p_Projekt        = &p_Projekt;

            prompt p_Formatierung   = &p_Formatierung;

            prompt p_Quelle_DB      = &p_Quelle_DB;

            prompt p_Ziel_DB        = &p_Ziel_DB;

            prompt --------------------------------------------------------------------------------;

            prompt user_source...;

            prompt --------------------------------------------------------------------------------;

            (

            select &p_Formatierung '&p_Quelle_DB - &p_Ziel_DB' Differenz, NAME,  TYPE, LINE, rtrim(translate(TEXT,chr(10)||chr(0),'  '),' ') q_text from user_source@&p_Quelle_DB where name in (select adm.objektname from adm_objekt_projekt adm where adm.projekt='&p_Projekt')

            minus

            select &p_Formatierung '&p_Quelle_DB - &p_Ziel_DB' Differenz, NAME,  TYPE, LINE, rtrim(translate(TEXT,chr(10)||chr(0),'  '),' ') z_text from user_source@&p_Ziel_DB   where name in (select adm.objektname from adm_objekt_projekt adm where adm.projekt='&p_Projekt')

            )

            union all

            (

            select &p_Formatierung '&p_Ziel_DB - &p_Quelle_DB' Differenz, NAME,  TYPE, LINE, rtrim(translate(TEXT,chr(10)||chr(0),'  '),' ') z_text from user_source@&p_Ziel_DB   where name in (select adm.objektname from adm_objekt_projekt adm where adm.projekt='&p_Projekt')

            minus

            select &p_Formatierung '&p_Ziel_DB - &p_Quelle_DB' Differenz, NAME,  TYPE, LINE, rtrim(translate(TEXT,chr(10)||chr(0),'  '),' ') q_text from user_source@&p_Quelle_DB where name in (select adm.objektname from adm_objekt_projekt adm where adm.projekt='&p_Projekt')

            )

            order by 2,3,4,1

            ;

            prompt --------------------------------------------------------------------------------;

             

             

            Run script with F5 with editor encoding ISO-8859-15:


            --------------------------------------------------------------------------------

             

            'ÖÄÜÖÄܧ$%&;'

            -------------

            öäü ÖÄÜ §$%&;

             

            p_Projekt        = Administration

            p_Formatierung   = /*ansiconsole*/

            p_Quelle_DB      = brztest0a

            p_Ziel_DB        = brzprod0a

            --------------------------------------------------------------------------------

            user_source...

            --------------------------------------------------------------------------------

            DIFFERENZ              NAME      TYPE       LINE  Q_TEXT                              

            brztest0a - brzprod0a  ADM_MIST  PROCEDURE  1     procedure adm_mist as               

            brztest0a - brzprod0a  ADM_MIST  PROCEDURE  2     begin                               

            brztest0a - brzprod0a  ADM_MIST  PROCEDURE  3       null;                             

            brztest0a - brzprod0a  ADM_MIST  PROCEDURE  4       --just comment chars ��� ��� �$%& 

            brztest0a - brzprod0a  ADM_MIST  PROCEDURE  5     end adm_mist;                       

             

             

            --------------------------------------------------------------------------------

             

             

            Run last Statement in script with F9:

             

            brztest0a - brzprod0a    ADM_MIST    PROCEDURE    1    procedure adm_mist as

            brztest0a - brzprod0a    ADM_MIST    PROCEDURE    2    begin

            brztest0a - brzprod0a    ADM_MIST    PROCEDURE    3      null;

            brztest0a - brzprod0a    ADM_MIST    PROCEDURE    4      --just comment chars öäü ÖÄÜ §$%&

            brztest0a - brzprod0a    ADM_MIST    PROCEDURE    5    end adm_mist;

             

             

            Maybe you would like to know the following...

            select * from sys.nls_database_parameters ;

            NLS_RDBMS_VERSION    12.1.0.2.0

            NLS_NCHAR_CONV_EXCP    FALSE

            NLS_LENGTH_SEMANTICS    BYTE

            NLS_COMP    BINARY

            NLS_DUAL_CURRENCY    $

            NLS_TIMESTAMP_TZ_FORMAT    DD-MON-RR HH.MI.SSXFF AM TZR

            NLS_TIME_TZ_FORMAT    HH.MI.SSXFF AM TZR

            NLS_TIMESTAMP_FORMAT    DD-MON-RR HH.MI.SSXFF AM

            NLS_TIME_FORMAT    HH.MI.SSXFF AM

            NLS_SORT    BINARY

            NLS_DATE_LANGUAGE    AMERICAN

            NLS_DATE_FORMAT    DD-MON-RR

            NLS_CALENDAR    GREGORIAN

            NLS_NUMERIC_CHARACTERS    .,

            NLS_NCHAR_CHARACTERSET    AL16UTF16

            NLS_CHARACTERSET    WE8ISO8859P15

            NLS_ISO_CURRENCY    AMERICA

            NLS_CURRENCY    $

            NLS_TERRITORY    AMERICA

            NLS_LANGUAGE    AMERICAN

             

             

            select * from sys.nls_instance_parameters ;

            NLS_LANGUAGE    AMERICAN

            NLS_TERRITORY    AMERICA

            NLS_SORT   

            NLS_DATE_LANGUAGE   

            NLS_DATE_FORMAT   

            NLS_CURRENCY   

            NLS_NUMERIC_CHARACTERS   

            NLS_ISO_CURRENCY   

            NLS_CALENDAR   

            NLS_TIME_FORMAT   

            NLS_TIMESTAMP_FORMAT   

            NLS_TIME_TZ_FORMAT   

            NLS_TIMESTAMP_TZ_FORMAT   

            NLS_DUAL_CURRENCY   

            NLS_COMP    BINARY

            NLS_LENGTH_SEMANTICS    BYTE

            NLS_NCHAR_CONV_EXCP    FALSE

             

            select * from sys.nls_session_parameters ;

            NLS_LANGUAGE    GERMAN

            NLS_TERRITORY    GERMANY

            NLS_CURRENCY    EUR

            NLS_ISO_CURRENCY    GERMANY

            NLS_NUMERIC_CHARACTERS    .,

            NLS_CALENDAR    GREGORIAN

            NLS_DATE_FORMAT    yyyy-mm-dd"T"hh24:mi:ss

            NLS_DATE_LANGUAGE    GERMAN

            NLS_SORT    GERMAN

            NLS_TIME_FORMAT    HH24:MI:SSXFF

            NLS_TIMESTAMP_FORMAT    yyyy-mm-dd"T"hh24:mi:ss,ff

            NLS_TIME_TZ_FORMAT    HH24:MI:SSXFF TZR

            NLS_TIMESTAMP_TZ_FORMAT    yyyy-mm-dd"T"hh24:mi:ss,fftzh:tzm

            NLS_DUAL_CURRENCY    €

            NLS_COMP    BINARY

            NLS_LENGTH_SEMANTICS    BYTE

            NLS_NCHAR_CONV_EXCP    FALSE

             

             

            Thanx for asking, C

            • 3. Re: encoding for skript output panel
              @c*689064*

              What you can see is, that chars from the editor are handled well,

               

              'ÖÄÜÖÄܧ$%&;'

              -------------

              öäü ÖÄÜ §$%&;

               

              but chars from user_source (out of database) are handled in differnt ways!


              Run script with F5 with editor encoding ISO-8859-15:


              brztest0a - brzprod0a  ADM_MIST  PROCEDURE  4       --just comment chars ��� ��� �$%& 

               

                 Run last Statement in script with F9:

               

              brztest0a - brzprod0a    ADM_MIST    PROCEDURE    4      --just comment chars öäü ÖÄÜ §$%&

              • 4. Re: encoding for skript output panel
                @c*689064*

                OK, I found the problem: The formating option /*ansiconsole*/ in SQL Developer is changing the encoding!

                 

                Take this script:

                 

                --------------------------------------------------------------------------------

                --------------------------------------------------------------------------------

                --------------------------------------------------------------------------------

                --Vergleiche die Objekte je Projekt von brzentw0a, brztest0a und brzprod0a

                --------------------------------------------------------------------------------

                --------------------------------------------------------------------------------

                --------------------------------------------------------------------------------

                clear screen;

                set echo off;

                set verify off;

                --show all;

                --show pagesize;

                set pagesize 50000;

                --set define off;

                set define on;

                define p_Projekt='Administration';

                define p_Formatierung=/*ansiconsole*/;

                define p_Quelle_DB='brztest0a';

                define p_Ziel_DB  ='brzprod0a';

                prompt --------------------------------------------------------------------------------;

                select 'öäü ÖÄÜ §$%&;' from dual;

                prompt p_Projekt        = &p_Projekt;

                prompt p_Formatierung   = &p_Formatierung;

                prompt p_Quelle_DB      = &p_Quelle_DB;

                prompt p_Ziel_DB        = &p_Ziel_DB;

                prompt --------------------------------------------------------------------------------;

                prompt user_source...;

                prompt --------------------------------------------------------------------------------;

                --select &p_Formatierung '&p_Quelle_DB - &p_Ziel_DB' Differenz, NAME,  TYPE, LINE, rtrim(translate(TEXT,chr(10)||chr(0),'  '),' ') q_text from user_source@&p_Quelle_DB where name ='ADM_MIST';

                select * from user_source@&p_Quelle_DB where name ='ADM_MIST';

                select &p_Formatierung * from user_source@&p_Quelle_DB where name ='ADM_MIST';

                prompt --------------------------------------------------------------------------------;

                • 5. Re: encoding for skript output panel
                  @c*689064*

                  You can reduce the problem to:

                   

                  Run script with F5:

                   

                  select 'öäü ÖÄÜ §$%&;' from dual;

                  select /*ansiconsole*/ 'öäü ÖÄÜ §$%&;' from dual;

                   

                  Its the format /*ansiconsole*/ with changes the encoding! (to ansi, because of its name!)

                  1 person found this helpful