in reply to Stupid UTF-8 issue with CSV file

It is properly encoded using UTF-8. Even though "quindi è perfetto" shows up as "quindi Ú perfetto" in the page you linked, "è" is encoded as C3 A8 in the file you linked. So the question becomes: What encoding does Amazon expect? There could also be an issue in how the data was passed to Amazon.

Update: Removed bit about the file not being a CSV file and how to fix that. That's obviously not relevant since Amazon is actually able to read your data. Replaced it with more information about the encoding.

Replies are listed 'Best First'.
Re^2: Stupid UTF-8 issue with CSV file
by ultranerds (Hermit) on Dec 05, 2016 at 18:38 UTC

      What happens if you force the file to be written as UTF-8?

      open(my $output, '>:utf8', $filename) or die "Cannot write $filename: +$!";

      Considering that the CVS data is in UTF-8, which is a good idea anyway unless you have restrictions for it.

      You should be using open with three arguments anyway, it is a good practice.

      Alceu Rodrigues de Freitas Junior
      ---------------------------------
      "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

        What he has is equivalent.

Re^2: Stupid UTF-8 issue with CSV file
by ultranerds (Hermit) on Dec 06, 2016 at 07:42 UTC

      Don't just replace :utf8 with :encoding(iso-latin-1).

      Instead of

      my $qfn = $CFG->{admin_root_path}."/amazon_template_tmp/it_other.csv"; open(my $fh, '>:encoding(iso-latin-1)', $qfn) or die("Can't create \"$qfn\": $!\n"); print($fh $the_contents);
      use
      use Encode qw( encode ); my $qfn = $CFG->{admin_root_path}."/amazon_template_tmp/it_other.csv"; open(my $fh, '>:raw', $qfn) or die("Can't create \"$qfn\": $!\n"); print($fh encode('iso-latin-1', $the_contents, Encode::FB_HTMLCREF));

      That way, characters that can't be encoded using iso-latin-1 will be replaced with HTML escapes (e.g. ♠).