19 Apr 01:41
Re: entity euro hurts
Mark Holland <mark-rHpctHB9Aj9Wk0Htik3J/w==@public.gmane.org>
2004-04-18 23:41:08 GMT
2004-04-18 23:41:08 GMT
Michele Beltrame wrote: >>I am using 2.05 I have got to work by using >> input => 'HTML', >> output => 'HTML', >>but if I use € or € it turns to  Â, while € turns to >>â???¬. >> >> > >I have the same problem, that's why I have to avoid using "€" for >now.> >I'm just using output => 'XHTML' and leave the rest as per default. >" " works until I insert an "€", after which no entity >seems to work anymore until I remove it. > > Try making sure all your output is unicode and that your browser is aware of this by setting your http content-type header to: Content-type: text/html; charset=utf-8 and adding the following meta tag to your html (as some browsers don't honour/recognise the charset portion of the content-type header) <meta http-equiv="content-type" content="text/html" charset=utf-8"/> I tried the € entity on my system with this set up and it produces the character with no problems. Note: What confused me about entities earlier was that my application was producing some ouput in latin-1 whilst the petal parts were producing utf-8. I just made sure that all the output I produced outside of petal was encoded to utf8, using use Encode; my $output = "Some string encoded in latin-1"; my $utf8string = encode("utf-8", $output); Hope this helps, ~mark
>
>I'm just using output => 'XHTML' and leave the rest as per default.
>" " works until I insert an "€", after which no entity
>seems to work anymore until I remove it.
>
>
Try making sure all your output is unicode and that your browser is
aware of this by setting your http content-type header to:
Content-type: text/html; charset=utf-8
and adding the following meta tag to your html (as some browsers don't
honour/recognise the charset portion of the content-type header)
<meta http-equiv="content-type" content="text/html" charset=utf-8"/>
I tried the € entity on my system with this set up and it produces
the character with no problems.
Note: What confused me about entities earlier was that my application
was producing some ouput in latin-1 whilst the petal parts were
producing utf-8. I just made sure that all the output I produced outside
of petal was encoded to utf8, using
use Encode;
my $output = "Some string encoded in latin-1";
my $utf8string = encode("utf-8", $output);
Hope this helps,
~mark
RSS Feed