I'm having a Perl script which saves a Word document as a HTML one. The following code works:
use strict;
use Win32::OLE::Const 'Microsoft Word';
[...]
$go_word_doc->SaveAs2({
FileName => $gs_html_name,
FileFormat => wdFormatFilteredHTML
});
In order to encode the output file in UTF-8, I turned my command in this way:
$go_word_doc->SaveAs2({
FileName => $gs_html_name,
FileFormat => wdFormatFilteredHTML,
Encoding => msoEncodingUTF8
});
The problem is that "msoEncodingUTF8" is seen as a bareword, and I can't find anywhere what I'm supposed to add for it to work.
Could anyone help, please? Thanks in advance.
The
MsoEncodingEnum gives names to the Windows code pages.msoEncodingUTF8is the name given to the UTF-8 code page,65001.