Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Apache, mod_perl and utf-8

Posted on 2007-12-07
4
Medium Priority
?
846 Views
Last Modified: 2013-11-13
Hy all

I'm getting crazy with mod_perl and utf-8. I already did everything that I found in the web about this and nothing works.

use Encode;
use utf8;

sub handler() {
      my $r = shift;
      $r->content_type('text/html; charset=utf-8');
      
      my $output = "<html><body>aécãcça ".time."</body></html>";
      
#      utf8::encode $output;
#      $r->print(Encode::encode('utf-8', $output));
      $r->print($output);
}


I don't know if this shall be about configuration.

PLEASE HELP, This is my first website done from 0, and I'm getting crazy.

Thanks
0
Comment
Question by:oleber
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Accepted Solution

by:
oleber earned 0 total points
ID: 20426400
Solved:

sub handler() {
      my $r = shift;
      $r->content_type('text/html; charset=utf-8');
      $r->send_http_header();
            
      my $output = "<html><body>aécãcça ".time."</body></html>";

      $r->print($output);
}
0
 
LVL 39

Expert Comment

by:Adam314
ID: 20442962
From the solution, I'm guessing the problem was you weren't sending proper headers before.
If you add this to your script, the errors will show up on the browser, instead of in the logs.  This can make it easier to debug:
use CGI::Carp 'fatalsToBrowser';
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20554883
Closed, 125 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question