aplonis has asked for the
wisdom of the Perl Monks concerning the following question:

I have some code to modify a *.INI file on WinXP which is in UTF16. And it seems to work. But when I open said modified copy in either Notepad or TextPad it displays with the null chars as whitespace.

Anybody know what is up with that?

Please tell me it is not one of those wretched registry entries which is needed. Or if it is, please give very specific details how to handle it...or an example.

I'm writing this mostly for other folks to use on WinXP. And even though I do have WinXP at work and on one of my laptops, I'm basically a NetBSD guy. Start in with the MS-speak and I'll be totally lost. Thanks for being compassionate to an outsider.

To expand on anonymonks terseness, you need to make sure that the file is read and written as binary to avoid newline translations. "pushing raw" translates to prefixing the encoding with ':raw'. The following works (copies a utf16le file with futzing with it) for me, but without the ':raw's, I see the same symptoms you describe.

For text files, I'd suggest using :raw:encoding(UTF-16LE):crlf:utf8 instead,
in which case Perl will do proper linefeed translations (on Windows), just like it would without
the :encoding(UTF-16LE). Otherwise, be prepared to handle
trailing carriage returns (\r) yourself — chomp (with the
default $/ setting), for example, will not remove them...

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other