Ensure Safe Oracle Scripts with Unicode Escaping

Published 07. December 2020

Updated October 2025


Introduction

Today we want to show you two features to improve the safety and flexibility of generated SQL scripts:

  1. Unicode escaping in INSERT statements — to avoid problems when your NLS character set can’t represent certain characters

  2. A filter expression editor — to build complex, client-side filter formulas right in the UI

Let’s explore both in detail.


Unicode Escaping in SQL

Some Unicode characters can’t be reliably represented within the encoding of the database’s NLS environment. To ensure those characters survive round trips in scripts, they can be escaped, using their numeric code points.

For example, the German character ß (Eszett) is escaped as \00DF. In an ASCII string it would appear as '\00DF'.

INSERT scripts generated by Hora now optionally support escaping control characters or non-ASCII characters using UNISTR calls. This allows your scripts to be robust and independent of NLS settings.

Using the UNISTR function to insert Unicode characters

Using the UNISTR function to insert Unicode characters

In this format:

  • Each escaped Unicode character is shown as \ plus its hexadecimal code

  • Regular ASCII characters and multiple Unicode sequences can coexist within the same literal


Filter Expression Editor

When building data grid filters, you now have access to formula-style expressions.

In the filter builder, click the f(x) button to open the expression editor, which supports:

  • Auto-complete for available columns and functions

  • Custom formulas combining string operations, numeric logic, and comparisons

Filtering by expressions in Hora's data content browser

Filtering by expressions in Hora’s data content browser

This empowers you to build rich client-side filters without needing to hand-code SQL or embed logic manually.


Usage & Context

These features were born from real user feedback — they address everyday problems in working with Oracle scripts and filtering data in grids.
You can always check our Release Notes for full details:


➡️ Try KeepTool for free

KeepTool's Oracle tools are designed specifically for developers, DBAs, and support teams.
Based on over 25 years of experience, we continuously optimize our software to make your database analysis and documentation faster, more efficient, and clearer.