Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Create MSWindows Registry REG_EXPAND_SZ entry

by ant9000 (Monk)
on Jul 07, 2003 at 15:05 UTC ( #271986=note: print w/ replies, xml ) Need Help??


in reply to Create MSWindows Registry REG_EXPAND_SZ entry

I like the idea, ++ for you. 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...


Comment on Re: Create MSWindows Registry REG_EXPAND_SZ entry
Re: Create MSWindows Registry REG_EXPAND_SZ entry
by Intrepid (Deacon) on Jul 07, 2003 at 16:21 UTC

    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.
       Soren A.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-08-21 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (127 votes), past polls