0 Replies Latest reply: Nov 28, 2012 10:48 AM by bencol RSS

    Data inputed using code page 437 needs converting

    bencol
      I'm in the process of converting a win1252 database to AL32UTF8, I have run the DMU scan on a cutdown database and am looking through the results. I have one value with an "Invalid Representation" Which I think has come about from the following:
      1. start sqlplus from command line - code page is set to 437
      2. string inserted containing a u with an umlaut - ü
      3. this is given an code point of 0081
      4. this code point does not exist in win1252.

      If I set the code page to 437 I can see the letter correctly, but can I convert correctly to code point 00FC using the CONVERT() function or somthing similar?

      My attempt doesn't convert it correctly
      SQL> host chcp 437
      Active code page: 437
      
      SQL> select ascii('ü') from dual;
      
      ASCII('ü')
      __________
             129
      SQL> select ascii(convert('ü','WE8MSWIN1252','US7ASCII')) from dual;
      
      ASCII(CONVERT('ü','WE8MSWIN1252','US7ASCII'))
      _____________________________________________
                                                191
      
      SQL> host chcp 1252
      Active code page: 1252
      
      SQL> select chr(191) from dual;
      
      C
      _
      ¿
      
      SQL> select ascii('ü') from dual;
      
      ASCII('Ü')
      __________
             252
      
      SQL> select * from v$version;
      
      BANNER
      ________________________________________________________________________________
      Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
      PL/SQL Release 11.2.0.3.0 - Production
      CORE    11.2.0.3.0      Production
      TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
      NLSRTL Version 11.2.0.3.0 - Production
      I can do this manually if required, but I do not know how many rows will be like this in my full database (scan on dev environment has been running for 24 hours).

      I want to do as much cleaning up as possible before running the DMU Convert.

      Thank you for your time,

      Ben