You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
There is an error:
error: migration failed: syntax error at or near "" (column 1) in line 1
when processing migration files encoded as UTF-8 with BOM
Steps to Reproduce
Steps to reproduce the behavior:
My migration file has no SQL errors, and is encoded using UTF-8 with BOM;
I ran migrate to use this migration file;
See error: error: migration failed: syntax error at or near "" (column 1) in line 1
Expected Behavior
Migration processed without errors.
Describe the Bug
There is an error:
error: migration failed: syntax error at or near "" (column 1) in line 1
when processing migration files encoded as UTF-8 with BOM
Steps to Reproduce
Steps to reproduce the behavior:
error: migration failed: syntax error at or near "" (column 1) in line 1
Expected Behavior
Migration processed without errors.
Migrate Version
4.17.1
Loaded Source Drivers
Source drivers: godoc-vfs, s3, go-bindata, file, github, github-ee, gitlab, bitbucket, gcs
Loaded Database Drivers
Database drivers: cassandra, postgresql, spanner, pgx, postgres, redshift, neo4j, clickhouse, pgx5, cockroach, cockroachdb, sqlserver, yugabyte, yugabytedb, stub, firebird, firebirdsql, crdb-postgres, mongodb, mongodb+srv, mysql, pgx4, ysql, rqlite
Go Version
go version go1.23.0 windows/amd64
Stacktrace
Nlo stack strace, just migration file printed to stdout.
Additional context
I suppose this may be not a
migrate
bug, rather than golang bug dealing with files encoded as UTF8 with BOM.See also:
https://stackoverflow.com/a/21375405/1828296
https://pkg.go.dev/golang.org/x/text/encoding/unicode
The text was updated successfully, but these errors were encountered: