Forum Stats

  • 3,757,648 Users
  • 2,251,252 Discussions
  • 7,869,878 Comments

Discussions

Missing non-ASCII character support

Philipp Salvisberg
Philipp Salvisberg Member Posts: 145 Silver Badge
edited Nov 4, 2018 3:31AM in Multilingual Engine

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" ASmodule.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

Philipp Salvisberg

Best Answer

  • Bastian Hossbach-Oracle
    Bastian Hossbach-Oracle Member Posts: 8
    edited Nov 3, 2018 1:56PM Accepted Answer

    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

    Philipp Salvisberg

Answers

  • Bastian Hossbach-Oracle
    Bastian Hossbach-Oracle Member Posts: 8
    edited Nov 3, 2018 1:56PM Accepted Answer

    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

    Philipp Salvisberg
  • Philipp Salvisberg
    Philipp Salvisberg Member Posts: 145 Silver Badge
    edited Nov 3, 2018 6:02PM

    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 

  • Bastian Hossbach-Oracle
    Bastian Hossbach-Oracle Member Posts: 8
    edited Nov 4, 2018 3:31AM

    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

    Philipp Salvisberg