in reply to How to support Unicode for Embeded Perl

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