output-file-encoding

Last updated: January 23, 2026

The --output-file-encoding global parameter is a string that determines which character encoding to use when writing Liquibase command outputs to external files. By default, it is set to UTF-8.

Uses

If you need to send the output of a Liquibase command like generate-changelog, update-sql, or diff to a text file that does not use UTF-8, you must specify the correct character encoding. This ensures that all symbols in your file display correctly.

Alternative or legacy character encodings include US-ASCII, Windows-1252, UTF-16, and others.

Note: Modifying the {encoding|fileEncoding} setting causes checksum mismatches for previously applied changesets. If your changeset edits are safe and intentional, you can explicitly tell Liquibase to accept the new checksum using validCheckSum. See How to resolve checksum errors for more information.

Syntax

You can set this parameter in the following ways:

Option

Syntax

Liquibase properties file (defaults file)

liquibase.outputFileEncoding: <string>

Global flow file argument

globalArgs: { output-file-encoding: "<string>" }

Global CLI parameter

liquibase --output-file-encoding=<string> update --changelog-file=example-changelog.xml

JVM system property (JAVA_OPTS environment variable)

Unix:

JAVA_OPTS=-Dliquibase.outputFileEncoding=<string>

Windows:

JAVA_OPTS=-D"liquibase.outputFileEncoding"=<string>

Liquibase environment variable

LIQUIBASE_OUTPUT_FILE_ENCODING=<string>

For more information, see Working with command parameters