dalibo / sqlserver2pgsql

Migration tool to convert a Microsoft SQL Server Database into a PostgreSQL database, as automatically as possible
http://dalibo.github.io/sqlserver2pgsql
GNU General Public License v3.0
515 stars 117 forks source link

Encoding Error #168

Open fclaudiopalmeira opened 2 years ago

fclaudiopalmeira commented 2 years ago

Hi, while running this on Windows I am getting the following error:

Encodings too ambiguous: utf8 or iso-8859-15 at ./sqlserver2pgsql.pl line 1506.

How can it be fixed

gviamont commented 1 year ago

I get the same error running it from an Ubuntu Linux system.

gviamont commented 1 year ago

@fclaudiopalmeira I'm not a contributor to this project, but I came up with a hack that works on my system. I commented out lines 1505 and 1506 and then modified line 1512 to this: open $file, "<:encoding(UTF-8)", $filename

Possible feature recommendation to the maintainers: Add a command line argument that accepts the schema's file encoding that bypasses the call to guess_encoding.

Also, thanks for creating this tool!