Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: UTF-8: Trying to make sense of form input

by Nigel Peck (Initiate)
on Sep 17, 2009 at 21:19 UTC ( #795980=note: print w/replies, xml ) Need Help??


in reply to UTF-8: Trying to make sense of form input

For what it's worth, I've been struggling with a very similar problem for ages, and in the end it appears that HTML::Entities was causing my problem. Since you're using it here, have a look at that. It encodes the characters directly (using char()) I believe, and I don't think it supports UTF8. I could be wrong, but that's what was causing my problem.
  • Comment on Re: UTF-8: Trying to make sense of form input

Replies are listed 'Best First'.
Re^2: UTF-8: Trying to make sense of form input
by ikegami (Pope) on Sep 17, 2009 at 21:35 UTC

    I don't think it supports UTF8.

    I think you mean UTF-8. UTF-8 is a character encoding. It's a means of converting characters to and from bytes for use in mediums that don't have a concept of characters.

    HTML::Entities works with characters, not bytes that were characters before they were encoded. It doesn't know anything of any character encoding (like UTF-8) since it only works with characters.

    The HTML portions you pass to decode_entities must first be decoded from bytes into characters (based on the encoding specified in the Content-Type header).

    Similarly, the HTML portions you receive from encode_entities must then be encoded from characters into bytes to characters (based on the encoding specified in the Content-Type header).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://795980]
help
Chatterbox?
[karlgoethebier]: Rap rhymes to crap. Ouch!
[karlgoethebier]: Unne hip unne hop unne schoppe inne kopp...
[1nickt]: kgb not quite as simple as ... and ...; are interchangeable. There are edge cases, shown in perlsyn.
[1nickt]: Hm well actually I guess it's not the trailing semi-colon that's at issue there, it's disambiguation between the ellipsis and the binary flip-flop

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-11-18 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?