Hi.
Can you help solve the following issue:
At our projects we use sql changelogs. These sql files are in utf-8, without BOM. Our Windows machines have cp-1251 encoding.
And as the result we have wrong characters for Russian letters in the DB after Liquibase runs scripts.
As far as I understand, Liquibase determines the encoding/charset of an sql changelog by the BOM in that file.
If there is no BOM - it uses system default encoding.
Code: UtfBomAwareReader.java : this.defaultCharsetName = Charset.defaultCharset().name();
I suggest to add the possibility to set defaultCharsetName somewhere. Possibly in xml changelog:
And this property should be applied to all the changelogs, these changelog includes (<include …>).
The other solution I see - adding BOM to our source files - is inconvenient for us.
P.S. I haven’t found how to create this issue at the jira (liquibase.jira.com), though, I’ve signed up there.
-
Learn
-
Resources
-
Free Tools
OSS Risk Scanner Database DevOps Risk AssessmentCheat Sheets
Snowflake + Liquibase Databricks + Liquibase -
eBooks
6 Liquibase Community Risks & How to Avoid Guide: SOC 2 Compliance at the Database Layer Guide: Quantify the Value of Liquibase Secure -
Comparison Guides
Liquibase vs. Flyway Liquibase vs. Bytebase Liquibase Community vs Liquibase Secure
-
- Quickstart
- Get Started
- Documentation
- University
-
Resources
- Connect
- Contribute
- Join
- Blog