Friday, May 9, 2025

sqlcl utf-8

I finally solved a tricky little UTF-8 problem.
The problem is that when I insert UTF-8 characters such as £ or € into a table, it works fine in SQL Developer, but not when running as a script in a sqlcl container.

This is fixed by setting LANG=en.UTF-8
The sql cl container can now be run as follows:

docker run -it --rm --env LANG=en.UTF-8 -v "$(Get-Location):/opt/oracle/sql_scripts/" container-registry.oracle.com/database/sqlcl:23.3.0 -S -nohistory -noupdates -LOGON "$logon" "@$scriptFileName"

No comments: