Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: What is the proper way to deal with Char v. Byte Semantics

by ncw (Friar)
on Jan 11, 2002 at 19:43 UTC ( #138028=note: print w/replies, xml ) Need Help??


in reply to What is the proper way to deal with Char v. Byte Semantics

I have to say I had exactly the same problem trying to send UTF8 encoded XML stuff over HTTP (using Frontier::RPC2). Perl and me both got terribly confused over whether any given string was UTF8 or not.

This ended up being a complete nightmare especially since this code had to work on 5.5 and 5.6. In the end I worked out that something in Frontier::RPC2 was converting my strings to UTF8 behind my back under 5.6 whereas I had to convert them by hand in 5.5.

I experimented with 'use bytes' too but that didn't cut it either.

This code snipped might be useful

$unicode_perl = 1; { local $SIG{__DIE__}; eval "use utf8; 1" or $unicode_perl = 0; }
Altogether a very unpleasant experience which makes me think that 5.6 isn't really ready for UTF :-( Maybe 5.8 will be better in this regard.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-01-19 00:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (54 votes). Check out past polls.

    Notices?