Name

set_utf8_output, dbg_assert_encoding — control UTF-8 output mode and assert string encoding for debugging

Synopsis

set_utf8_output( inout connection any,
  in is_utf8 integer);
 
dbg_assert_encoding( in value any,
  in encoding varchar);
 

Description

set_utf8_output toggles whether the named client connection emits narrow string values as UTF-8 (non-zero is_utf8) or as bytes in the session's default narrow character set (zero). Setting this on a connection affects every subsequent result set produced over it. Primarily used by clients that prefer to receive text as UTF-8 regardless of the server's default charset.

dbg_assert_encoding verifies that value is encoded in encoding and raises an SQL error if not. Recognised encoding names are UTF-8 and 8-BIT. Intended for use during development and in unit tests when the encoding invariant of a string is non-obvious; not for production code.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®