3 Replies Latest reply on Nov 4, 2018 8:31 AM by Bastian Hossbach-Oracle

    Missing non-ASCII character support

    Philipp Salvisberg

      It looks like there are issues with non-ASCII characters in the MLE. Here's an example. You may run it in the SQL workshop.

       

      CREATE JAVASCRIPT SOURCE NAMED "greeting.js" AS
      module.exports.greeting = function (person) {
          return "Hello " + person + "!";
      }
      /
      
      CREATE OR REPLACE FUNCTION greeting(in_person IN VARCHAR2) RETURN VARCHAR2 AS 
      LANGUAGE JS NAME 'greeting.js.greeting(person string) return string';
      /
      
      SELECT greeting('John McEnroe'), 
             greeting('Björn Borg') 
        FROM dual;
      

       

      The result is:

       

      john_bjoern.png

        • 1. Re: Missing non-ASCII character support
          Bastian Hossbach-Oracle

          Hi Philipp,

           

          thank you very much for trying out our APEX demo and for your report. Deploying JavaScript and Python functions via the DDL and calling them from SQL / PL/SQL is not an official feature of the APEX demo. This is still work in progress and not complete yet. For example, we currently only support 7-bit ASCII characters for calls from SQL. However, Unicode should work without problems in Dynamic MLE that has been integrated with APEX.

           

          Best regards,

           

          Bastian

          • 2. Re: Missing non-ASCII character support
            Philipp Salvisberg

            Hello Bastian,

             

            Thank you for the prompt answer and the clarification.

             

            Yes, unicode works as expected when used in an APEX process. However, the page 3 "Simple Input Form" of the MLE Sample App uses "validator.js" to validate a given e-mail address. The validation fails, when for example a German umlaut is used within the e-mail address. Umlauts in e-mail addresses are valid. See also https://npm.runkit.com/validator. And this part of the APEX demo seems to be affected of the 7-bit ASCII limitation. ;-)

             

            Regards,

            Philipp 

            • 3. Re: Missing non-ASCII character support
              Bastian Hossbach-Oracle

              Hi Philipp,

               

              you are absolutely correct. The e-mail validation example on page 3 of the APEX-MLE demo does indeed not work with non-ASCII characters. The tab "About validator.js" explains how validator.js has been deployed as a MLE module for the demo. All calls to it go through the SQL layer behind the scenes. As you guessed, this then introduces the limitation to 7-bit ASCII characters. The limitation will go away as soon as we fully support Unicode for calls from SQL.

               

              Best regards,

               

              Bastian