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:
- Don't forget to log in on your user account before posting. When someone replies to a node posted by nagamohan_p, you will get notification that you have a reply. If I reply to a post by AnonymousMonk, you don't get notified.
- Please read Writeup Formatting Tips and What shortcuts can I use for linking to other information? -- in general, browse the sections of the PerlMonks FAQ, especially the sections about Posting and Linking. You need to start using <code> tags for code and data, as well as square brackets for links.
- When responding to advice, please show some evidence that you have actually tried to follow the advice, and if things are still not working right, show some new details about the problem (a different data sample, results from testing things a different way, etc).
- If you don't understand something in the advice you have been given, please try to be clear about what it is you don't understand, and ask for clarification. Don't just repeat the original question.
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
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.