documentation/Reference/Configuration/Flyway Namespace/Flyway Detect Encoding Setting.md
Whether Flyway should attempt to auto-detect the file encoding of each migration.
Note: We recommend using a consistent file encoding to minimize the issues you encounter and specifying it to the
encodingparameter. See Troubleshooting for known problems and solutions.
Flyway can detect each of the following formats:
UTF-8ISO-8859-1UTF-16 BOMlessUTF-16 LEUTF-16 BEWhen Flyway fails to auto-detect, it will default to the configured encoding if set, UTF-8 if not.
If a script configuration file defines an encoding, auto detection will be skipped on that file.
Boolean
false
This is not supported by Flyway Desktop.
. Namespace/Flyway encoding#troubleshooting) for known problems and solutions.
Flyway can detect each of the following formats:
* `UTF-8`
* `ISO-8859-1`
* `UTF-16 BOMless`
* `UTF-16 LE`
* `UTF-16 BE`
When Flyway fails to auto-detect, it will default to the configured encoding if set, UTF-8 if not.
If a script configuration file defines an encoding, auto detection will be skipped on that file.
## Type
Boolean
## Default
`false`
## Usage
### Flyway Desktop
This is not supported by Flyway Desktop.
### Command-line
```powershell
. flyway -detectEncoding="true" migrate
[flyway]
detectEncoding = true
flyway.detectEncoding=true
FLYWAY_DETECT_ENCODING=true
Flyway.configure()
.detectEncoding(true)
.load()
flyway {
detectEncoding = true
}
<configuration>
<detectEncoding>true</detectEncoding>
</configuration>