About your last update: null byte after every byte smells badly of multibyte character encoding... IIRC, XP does Unicode - that should explain the second (always null) byte if you are dealing with standard ASCII chars. Trying to manage Regedit5 strings with Perl Unicode support should work, I guess...
Yes, I have garnered more information since that update. This is the situation:
There is more than one "REGEDIT". The older Regedt32 tool that came with Windows3.x was removed for Windows9x, but restored with WinNT and its decendants. Furthermore the regedit tool with WinXP is a very different creature than the one with 9x: it seems to combine the better features of both Regedit and Regedt32. This is "Registry Editor Version 5".
So the crucial thing is which version of Regedit are we talking about. It's not so much which Windows but which Regedit. After all, just saying "XP does Unicode" isn't stating anything particularly informative or relevent. So does NT, 2K, Me, even 98 and 95 if extra software from Microsoft is added. All M$ OSes "do Unicode" (at least potentially).
What changed with Regedit ver 5 (? - or already existed) is that there came into being a new type of string datum for .REG files, and of course you and others guessed right, it is a multi-byte character Unicode string type. So there are ANSI .REG files and Unicode .REG files.
The thing that's irritating is that even though we can create perfectly valid REG_EXPAND_SZ entries for a .REG file with Perl's help, we cannot enter them into the Registry on 95/98 because of bugs or limitations (reports vary on which this is) in the REGEDIT tool in those OSes. This goes for either ANSI or Unicode entries, BTW, no difference wrt this issue.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||