Bug 10312 - text/x-ms-regedit
Summary: text/x-ms-regedit
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-03-15 14:02 UTC by Robert Millan
Modified: 2008-02-22 05:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for text/x-ms-regedit (635 bytes, patch)
2007-03-15 14:03 UTC, Robert Millan
Details | Splinter Review
new patch with WinXP support (807 bytes, patch)
2007-03-15 15:01 UTC, Robert Millan
Details | Splinter Review
test case (generated with Windows XP) (1.59 KB, application/octet-stream)
2008-02-21 13:04 UTC, Robert Millan
Details

Description Robert Millan 2007-03-15 14:02:44 UTC
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.
Comment 1 Robert Millan 2007-03-15 14:03:17 UTC
Created attachment 9170 [details] [review]
patch for text/x-ms-regedit
Comment 2 Robert Millan 2007-03-15 15:01:09 UTC
Created attachment 9171 [details] [review]
new patch with WinXP support

New patch, with support for WinXP versions.
Comment 3 Pino Toscano 2007-03-19 02:04:14 UTC
I would change the description is something a bit more meaningful, like:
"Windows registry file"
Comment 4 Bastien Nocera 2008-02-21 09:56:55 UTC
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 <rmh@aybabtu.com>
to add Microsoft Registry mime-types, for use in Wine
(Closes: #10312)
* tests/list:
* tests/registry.reg:
* tests/registry-nt.reg: Add test files for the Windows Registry
mime-type
Comment 5 Robert Millan 2008-02-21 12:24:04 UTC
Hi!

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?
Comment 6 Bastien Nocera 2008-02-21 12:34:37 UTC
(In reply to comment #5)
> Hi!
> 
> 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...

Comment 7 Robert Millan 2008-02-21 13:04:33 UTC
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.
Comment 8 Bastien Nocera 2008-02-21 14:37:45 UTC
Thanks, fixed in CVS.

* freedesktop.org.xml.in:
* tests/registry.reg: Detect registry files when they're
UTF-16 encoded as exported by regedit on Windows XP,
magic provided by Robert Millan <rmh@aybabtu.com>
Comment 9 Robert Millan 2008-02-22 05:01:58 UTC
Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.