5 Replies Latest reply on Mar 24, 2016 12:59 AM by Trevis

    File browse changes some NLS settings - possible bug

    p.belanger

      Hi,

       

      In 5.0.3, using a file browse item where storage type is set to table APEX_APPLICATION_TEMP_FILES will change some NLS settings in the page processing.  This happens only when a file is selected.

       

      The issue i'm getting is that the primary language on my application is French (Canada) and NLS_NUMERIC_CHARACTERS is set to ', '.  When uploading a file, NLS_NUMERIC_CHARACTERS is changed to '.,' and some number conversions are failing.  Again, this problem only happen when a file is selected.

       

      You can see the issue here : https://apex.oracle.com/pls/apex/f?p=63561:1

       

      It looks like a bug to me, as we should not have to work around a change in the NLS parameters.

       

      Thank you

        • 1. Re: File browse changes some NLS settings - possible bug
          Tobias Arnhold

          Hi,

           

          I experience the same issue with APEX 5.0.1. It worked in APEX 4.2.

           

          Regards,

           

          Tobias

          • 2. Re: File browse changes some NLS settings - possible bug
            Tobias Arnhold

            I investigated it a bit further and you are right. In the moment when you upload a file the NLS parameter get switched to:

            select listagg(parameter || ':'|| value, CHR(10)) WITHIN GROUP (ORDER BY parameter)

            into :P1_TEXT_AREA

            from nls_session_parameters ;

             

            NLS_CALENDAR:GREGORIAN

            NLS_COMP:BINARY

            NLS_CURRENCY:$

            NLS_DATE_FORMAT:DD.MM.YYYY

            NLS_DATE_LANGUAGE:AMERICAN

            NLS_DUAL_CURRENCY:$

            NLS_ISO_CURRENCY:AMERICA

            NLS_LANGUAGE:AMERICAN

            NLS_LENGTH_SEMANTICS:BYTE

            NLS_NCHAR_CONV_EXCP:FALSE

            NLS_NUMERIC_CHARACTERS:.,

            NLS_SORT:BINARY

            NLS_TERRITORY:AMERICA

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

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

            NLS_TIME_FORMAT:HH.MI.SSXFF AM

            NLS_TIME_TZ_FORMAT:HH.MI.SSXFF AM TZR

             

            In case I don't upload a file I get this:

            NLS_CALENDAR:GREGORIAN

            NLS_COMP:BINARY

            NLS_CURRENCY:€

            NLS_DATE_FORMAT:DD.MM.YYYY

            NLS_DATE_LANGUAGE:GERMAN

            NLS_DUAL_CURRENCY:€

            NLS_ISO_CURRENCY:GERMANY

            NLS_LANGUAGE:GERMAN

            NLS_LENGTH_SEMANTICS:BYTE

            NLS_NCHAR_CONV_EXCP:FALSE

            NLS_NUMERIC_CHARACTERS:,.

            NLS_SORT:GERMAN

            NLS_TERRITORY:GERMANY

            NLS_TIMESTAMP_FORMAT:DD.MM.RR HH24:MI:SSXFF

            NLS_TIMESTAMP_TZ_FORMAT:DD.MM.RR HH24:MI:SSXFF TZR

            NLS_TIME_FORMAT:HH24:MI:SSXFF

            NLS_TIME_TZ_FORMAT:HH24:MI:SSXFF TZR

             

            Definetly a bug. NLS parameters will hold for all processes during the submit.

             

            Workaound:

            Ad this code snippet infront of your import process (add your language settings)

             

            execute immediate 'alter session set nls_language=GERMAN';

            EXECUTE IMMEDIATE 'ALTER SESSION SET nls_numeric_characters='',.''';

            apex_util.set_session_lang('de');

            • 3. Re: File browse changes some NLS settings - possible bug
              Patrick Wolf-Oracle

              Hi,

               

              thanks for the bug report. I have filed

               

              Bug 22762425 - file upload will ignore application nls settings

               

              and fixed it for APEX 5.1.

               

              As an additional information. This issue is specific to ORDS, it will not occur when using mod_plsql or EPG.

               

              Regards

              Patrick

              • 4. Re: File browse changes some NLS settings - possible bug
                Trevis

                Is there some workaround for "Automatic Row Processing (DML)" in 5.0.3?

                 

                I'm trying to enter a file on the same page (created by Wizard) where I have some numeric items with format mask and I'm getting stuck...

                 

                I've created an application process as indicated here APEX 5 - File Upload Bug | APEX-AT-WORK by Tobias Arnold but it didn't work. Also I tried run this "ALTER SESSION" before than my DML process but it didn't work neither.

                 

                Do you guys have some clue how to handle this until 5.1 become available?

                • 5. Re: File browse changes some NLS settings - possible bug
                  Trevis

                  I got my problem...

                   

                  The workaround suggested by Tobias Arnold worked nicely. I just had to include one more NLS settings for currency as well.