Currently I use
at the very start of my MyWebApp.pm module and a bit later I add $self->header_add(-charset => 'utf-8');
in the setup() suboutine. And it works...
But is this the correct way of doing it. So far I haven't handled form input data, etc. (which should be no other encoding, as I server utf-8 pages anyway!?).
I have seen different hacks to output utf8 with CGI.pm and utf8 (here
Now, any insight? What is the correct way of declaring the cgi.pm object's content as utf8 and outputting it as such? Is there a CGI::Application switch to set, so that it handles the contents as utf8 and sets the header correctly?