Actually I was shocked myseld when I saw the output of $] (perl's version)! But I am running on managed hosting and I am not able to update perl.
Also, the Encoding module is not available for me, and as it is based on a binary, I can't just upload it to working dir...
So basically I am stuck here. The old Perl always worked for me, until recently when I startet to wrangle with XML and UTF8. Soon I found out I would need a western to utf8 transcoder - that's when I found out there is really no lightweight alternative to Encoding...
Back to my question:
The greek 'y' is in utf8 (at least it should be) (btw: I am getting it from utf8-SQL-db via XML, no problems so far) and printed that way, it turns out right -at least on its own.
When I add the "smiley" (which is also utf8, as I understand it...) (generated via the xCode) it seems to change the $string1 to a different utf8 beast... Giving me a strange accented "I" and "1/4" while the "smiley" is smiling just beside the mess.
Like you pointed out: It might/must be the problem that although I am telling the browser the output is utf8, perl doesn't output it as such (which I don't understand as everything in the html including both strings should be utf8).
Is there ANY way to do this in 5.6.1, to really output utf8. The "pack" trick mentioned everywhere doesn't seem to work for me... And using "use encoding utf8" commands etc. gives an error...
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.