vsdeepthi has asked for the wisdom of the Perl Monks concerning the following question:
And the module XYZ has code like below:#!/usr/local/bin/perl use XYZ; my $x = new XYZ(); $x->gen_pb(); 1;
But the same module when called from a CGI generates the word document but without the french accents. Perl CGI Programpackage XYZ; sub gen_pb { $template->process("$dir/$input",$vars, \$content, {binmode => ':encod +ing(utf8)'} ) || return "Template Error: " . $ +template->error(); unlink($doc_file) if(-e $doc_file); open(FHPB,">$doc_file"); binmode( FHPB, ":encoding(UTF-8)" ); print FHPB $content; close FHPB; }
#!/usr/local/bin/perl use CGI::Application; use XYZ; .... my $x = new XYZ(); $x->gen_pb();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem writing french accents to a word file using CGI::Application
by CountZero (Bishop) on Apr 04, 2015 at 20:18 UTC | |
by Anonymous Monk on Apr 07, 2015 at 12:27 UTC | |
by CountZero (Bishop) on Apr 07, 2015 at 15:31 UTC | |
|
Re: Problem writing french accents to a word file using CGI::Application
by Anonymous Monk on Apr 05, 2015 at 01:46 UTC |