db2topg guess_encoding dies
gojkocc opened this issue · 2 comments
Hi,
first of all thanks for this script!
While executing "./db2topg.pl -f db2_sql_script -o Folder -d XXX -p ***" I receive the following output: "iso-8859-15 or utf8 at ./db2topg.pl line 383"
Is this an error or just a information about the decoding output of guess_encoding?
The following Code snippet includes the relevant lines:
[382] my $decoder = guess_encoding($data_guess, qw/iso8859-15 utf8 utf16-le utf16-be/);
[383] die $decoder unless ref($decoder);
The problem is that I don't get any output file/folder nor info/warning from the above-named command.
Thank you for your help
edit line 382 to : my $decoder = guess_encoding($data_guess, qw/ utf16-le utf16-be UTF-16le UTF-16be/);
it sets to UTF by default, in other case it'll take UTF-16le UTF-16be.
That resolved my issue ( same as yours )
You need remove the utf8 and iso-8859-15 in line 382.