Okay, how do you know when you're using one or the other?
I change the character encoding in Kate. I actually copy, then change encoding, and then paste over.
6 numerics instead of 3 for that 3-character string definitely means "not utf8" (so presumably euc, based on what you've said);
You are right -- EUC gives 3, and utf8 gives 6. However, the ones EUC gives are not the ones I need. :)
And what do you mean by "the values are actually just HTML representation"?
Sorry, that sounds stupid. They are the decimal form of Unicode, which HTML can read as XXXX;You can type in the above string into this little engine and have it spit out the result.
http://www.pinyin.info/tools/converter/chars2uninumbers.html
Are you really still having a problem with this?
I think I've got it now, but I still don't know how I can get this decimal value in Perl. If I pass a utf8 string to ord(), it gives me a value for each byte, not the double-byte character. I could do something tacky and pass my string in question to the aforementioned website to get the decimal value, but that seems overkill, to say the least.
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.