Andy Armstrong wrote:
On 28 Jun 2009, at 17:33, Bill Moseley wrote:
You need to encode the character data before writing back out either
by encoding explicitly or using a layer.
Or possibly not decode it in the first place and treat it as an opaque
octet stream. All depending, of course, on what it is you're trying to
achieve.
I was not trying to achieve anything, and I do understand the
encoding/decoding aspect.
Basically, by using the '>:raw' encoding for the output stream, I was
not expecting perl to warn me that I was (knowingly) outputting "wide
characters" there, so I was surprised at the warning.
I /would/ have expected it if I was /not/ specifying an encoding, like
using simply '>'. But not when I am explicitly specifying '>:raw',
which in my mind, and according to my interpretation of the on-line
documentation, is equivalent to saying "output whatever you have as
bytes in that string variable right now, as is, I know what I'm doing".
But I guess my interpretation of the documentation is incorrect then.