Please add a MIME type to handle Windows registry files. This is necessary so that the "regedit" command provided by Wine can process and incorporate them into the Wine registry.
Created attachment 9170 [details] [review]
patch for text/x-ms-regedit
Created attachment 9171 [details] [review]
new patch with WinXP support
New patch, with support for WinXP versions.
I would change the description is something a bit more meaningful, like:
"Windows registry file"
I removed the "binary" bits from Windows XP (I couldn't find any mentions of it, and binary data means it can't descend from text/plain), and added "Windows Registry Editor Version 5.00" as one of the magics (see http://www.ss64.com/nt/regedit.html).
I also change the name to "Windows Registry extract".
* freedesktop.org.xml.in: Patch from Robert Millan <email@example.com>
to add Microsoft Registry mime-types, for use in Wine
* tests/registry-nt.reg: Add test files for the Windows Registry
The binary data was not gratuitous. Windows does actually store files this way. The first two bytes are a marker indicating the file is utf-16, and the rest is encoded in utf-16 as well.
As long as the matching algorithm keeps working, I guess there's no problem though. But I seriously doubt it does.
So, are you COMPLETELY sure it works?
(In reply to comment #5)
> The binary data was not gratuitous. Windows does actually store files this
> way. The first two bytes are a marker indicating the file is utf-16, and the
> rest is encoded in utf-16 as well.
> As long as the matching algorithm keeps working, I guess there's no problem
> though. But I seriously doubt it does.
> So, are you COMPLETELY sure it works?
Completely sure what works? I took example files from the internet, and they seem to work. Give me some documentation and example files that don't and we can work on adding support for them. I can't make files out of thin air...
Created attachment 14484 [details]
test case (generated with Windows XP)
I'm sorry, I should have really included a test case from the beginning.
Here you are now.
Thanks, fixed in CVS.
* tests/registry.reg: Detect registry files when they're
UTF-16 encoded as exported by regedit on Windows XP,
magic provided by Robert Millan <firstname.lastname@example.org>