A few observations regarding your utf-8 issues:
- The reason the is_utf8() check failed is because of Perl's backward
compatability issues. For hex values of "\x{00FF}" or less, the
is_utf8() check is supposed to fail. Here are are a few examples
using your variables:
binmode \*STDOUT, ':utf8';
my $u_temp = "Temperature:350\x{00B0}F html:°";
my $smiley = "Smiley:\x{263a}";
my $price_label = "Price:\x{20AC}9.99";
print 'is degree' if utf8::is_utf8( $u_temp );
print 'is smiley' if utf8::is_utf8( $smiley );
print 'is price label' if utf8::is_utf8( $price_label );
Others have already posted about binmode(), or 'use open' layers.
In addition to Perl related issues, also ensure that your fonts
for X (or Linux console), as well as your
browser (or xterm, or cat(1) ) are also able to display in utf8 charrs
using utf-8 fonts. (I use LatCyrGr-16.psf fonts for Linux console.)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|