1 Reply Latest reply on Aug 28, 2012 4:02 PM by 956366

    sqlplus linesize behaviour for special characters

      Sqlplus seems to treat special characters differently when cutting off lines in different sqlplus clients. I would like to understand why this happens.

      A character with ascii value 14844051 (I think this is a hyphen) selected in sqlplus started in Unix seems to counts as two characters, whereas in sqlplus started on my local machine (which I will call cmd) it is treated as one character.

      For example, when I display the string '12-45' (I shall use a normal dash in this example but the character in the middle represents the character with ascii value 14844051) with different linesizes, I get the following results in unix/cmd:

      As a general note: in cmd the character (retrieved from the database) is displayed as 'â' but in unix it is displayed as a hyphen. However, I am not concerned about which character is printed, only how many positions it takes up and where the line breaks.

      linesize 6 :
      * in cmd: '12â45'
      * in unix: '12-45'

      linesize 5 - not OK:
      * in cmd, the full string is on one line '12â45'
      * in unix:
      the characters '12-4' are displayed on one line and '5' is on the next

      linesize 2: - not OK:
      * in cmd, the result is OK:
      line 1: '12'
      line 2: 'â4'
      line 3: '5'
      * in unix, the result is not OK:
      line 1: '12'
      line 2: ''-'
      line 3: '45'

      In both instances the following NLS_PARAMETERS are set:

      This is on an Oracle database, sqlplus version unix: local machine:

      Does anybody know what causes this and how to control it? I can replace the special character but I am more interested in why this happens.