Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

SOLVED Re: Writing HTML file with UTF-8 chars

by cormanaz (Chaplain)
on Apr 27, 2013 at 18:33 UTC ( #1030999=note: print w/ replies, xml ) Need Help??


in reply to Writing HTML file with UTF-8 chars

The solution was

  • Add use utf8;
  • add binmode OUT, ":utf8"; after the file open
  • Do not use encode() on the values
Thanks for the comebacks everyone.


Comment on SOLVED Re: Writing HTML file with UTF-8 chars
Select or Download Code
Replies are listed 'Best First'.
Re: SOLVED Re: Writing HTML file with UTF-8 chars
by 2teez (Priest) on Apr 27, 2013 at 18:57 UTC

    On the second point: add binmode OUT, ":utf8";after the file open

    I think is better, to use binmode OUT, ":encoding(UTF-8)"; because ':encoding(UTF-8)'checks the data for actually being valid UTF-8, while ':utf8' just marks the data as UTF-8 without further checking.
    Please check binmode.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (16)
As of 2015-07-31 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (277 votes), past polls