Repository navigation
Fix init script decoding with configurable charsets - #12082
dlwhdgus0810 wants to merge 5 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Replace the inline docs example with a codeinclude from a new PostgreSQL integration test that also covers the windows-1252 init script end to end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The container wiring is covered end to end by the PostgreSQL init script charset test, and decoding by ScriptUtilsTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you @dlwhdgus0810, made some small adjustments in follow-up commits, and going to merge it once CI is green. |
Windows-1252 initialization scripts are decoded as UTF-8, corrupting accented characters before SQL reaches the database. Add an explicit
Charsetoverload toScriptUtils.runInitScriptandJdbcDatabaseContainer.withInitScriptCharsetso callers can select the script encoding. Existing calls continue to use UTF-8.The container setting applies to all scripts configured through
withInitScriptorwithInitScripts. JDBC URLTC_INITSCRIPTremains UTF-8, as documented. This changes file decoding, not the database character set.Regression coverage uses a Windows-1252 fixture containing
éand UTF-8 controls. The Windows-1252 case failed on the original implementation. All 62 database-commons and JDBC tests pass, along with both modulechecktasks (Checkstyle, Spotless, Javadoc, and API compatibility). Docker-backed Oracle integration was not run.Fixes #8776.
Summary by CodeRabbit
TC_INITSCRIPTare always read as UTF-8.