Need A Function To Escape And Unescape RDF Text (Doc ID 1563710.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

Need a function to escape and unescape RDF text

There is a need for converting data of type RDF into standard unescaped format. We also need a function to escape the RDF special characters.

Suggestion is to implement this in the SEM_APIS package
Here is an example:


FUNCTION escape_chars(in_str IN VARCHAR2,in_utf number :=0)
  RETURN VARCHAR2
  IS
  v_pos PLS_INTEGER;
  v_out VARCHAR2(4000);
  BEGIN
  if in_utf = 0 then
  v_out := REGEXP_REPLACE(in_str, '([\\"])+', '\\\1');
  else
  v_out := REGEXP_REPLACE(UNISTR(in_str), '([\\"])+', '\\\1');
  end if;
  RETURN v_out;
  END escape_chars;

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms