Search notes:

UTL_RAW.CAST_TO_datatype

The cast_to_<datatype> functions of utl_raw include:

CAST_TO_RAW

select value from v$nls_parameters where parameter = 'NLS_CHARACTERSET';
--
-- AL32UTF8

begin
   dbms_output.put_line(
      regexp_replace(
          utl_raw.cast_to_raw('René'),
        '(..)', '\1 '
      )
   );
end;
/
--
-- 52 65 6E C3 A9
utl_raw.cast_to_raw takes into account the current value of nls_characterset. With AL32UTF8 (which is essentially UTF-8), the value for é is 0xc3a9.
If I executed the same PL/SQL block in an environment where the value of nls_characterset is WE8MSWIN1252, the block would print 52 65 6E E9.

See also

utl_raw

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759612607, '216.73.216.149', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/packages/utl/raw/api/cast/to(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78