Missing non-ASCII character support — oracle-tech

    Forum Stats

  • 3,702,305 Users
  • 2,239,629 Discussions
  • 7,835,898 Comments

Discussions

Missing non-ASCII character support

Philipp SalvisbergPhilipp Salvisberg Posts: 103 Bronze Badge
edited November 2018 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

  • edited November 2018 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

  • edited November 2018 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 SalvisbergPhilipp Salvisberg Posts: 103 Bronze Badge
    edited November 2018

    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 

  • edited November 2018

    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
Sign In or Register to comment.