If the AnonymousMonk replying to my previous post was you, please pay attention to the following points, to make your use of PerlMonks more effective for everyone concerned:

As it is, the anonymous post does not contain any information that moves the discussion forward to a solution. Whatever the problem is with your browser in terms of showing you the Japanese word for "Hello", my browser (firefox on macosx) has no problem with it -- it's just that the data, as you posted it, is in Shift-JIS encoding, not utf8.

(BTW, the Japanese word in question, when translated to English by babelfish.altavista.com, comes out as "today"; but when they translate English "hello" to Japanese, it comes out as that same word. Go figure.)

In case you have not tried using the two diagnostic tools that I cited in my earlier reply, you will probably need to do that before you can make further progress. If the data in your script (or in some data file) really is encoded as utf8, the "tlu" script will show you the unicode hex code points for each character, and you can post the string in that form if you are still having problems.

For example, translating English "hello" to Japanese (and piping the result through tlu) yields the following string of unicode characters:

\x{3053}\x{3093}\x{306b}\x{3061}\x{306f}
You can look those up at http://www.unicode.org/charts/ and know for sure that we are talking about right string.

If you don't get those code points when you run your code/data through tlu, it means you are not using utf8 encoding, and the "bytes_to_utf8()" function will not help you with that.

Update: is this the link you meant to point to, regarding Embedded Perl? Embperl::Intro -- or maybe this one: perlembed


In reply to Re: How to support Unicode for Embeded Perl by graff
in thread How to support Unicode for Embeded Perl by nagamohan_p

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.