I try to create an Excel-file with perl and Excel::Writer::XLSX with an Excel-name which contains umlauts, but do not succeed.
use strict;
use warnings;
use Excel::Writer::XLSX;
my $excel_name = "äöü.xlsx";
print "\n$excel_name\n";
my $workbook = Excel::Writer::XLSX->new( $excel_name );
$workbook->close;
The Excel-file I got is named: äöü.xlsx. Also if I print the name on STDOUT the output has strange symbols: ├â┬ñ├â┬Â├â┬╝.xlsx.
When I print the name in a text file:
make_excel.pl >test.txt
the text-file contains the correct output äöü.xlsx and has utf-8 encoding (determined with Notepad++).
The working environment is, Windows 7, active codepage is cp950 and perl version 5.28 (Strawberry).
I tried using (among a lot of others):
use open ':std', ':encoding(cp850)';
but it does not gives the desired output.
Does anyone have an idea how I can get an Excel-file with umlaut?
Update 1:
The code is UTF-8 (according to Notepad++ and Emacs C-h v buffer-file-coding-system RET)