Index: trunk/lib/regfi.c
===================================================================
--- trunk/lib/regfi.c	(revision 255)
+++ trunk/lib/regfi.c	(revision 256)
@@ -1190,4 +1190,7 @@
     ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
 
+  if(vk->name_length == 0)
+    return;
+
   if(from_encoding == output_encoding)
   {
@@ -1280,5 +1283,8 @@
   REGFI_ENCODING from_encoding = (nk->flags & REGFI_NK_FLAG_ASCIINAME) 
     ? REGFI_ENCODING_ASCII : REGFI_ENCODING_UTF16LE;
-  
+
+  if(nk->name_length == 0)
+    return;  
+
   if(from_encoding == output_encoding)
   {
@@ -2345,6 +2351,6 @@
   bool found = false;
 
-  /* XXX: cur->name can be NULL in the registry.  
-   *      Should we allow for a way to search for that? 
+  /* XXX: should we allow "(default)" subkey names? 
+   *      Do realistically they exist?
    */
   if(name == NULL)
@@ -2357,6 +2363,6 @@
       return false;
 
-    if((cur->name != NULL)
-       && (strcasecmp(cur->name, name) == 0))
+    /* A NULL name signifies the "(default)" value for a key */
+    if(cur->name != NULL && (strcasecmp(cur->name, name) == 0))
     {
       found = true;
@@ -2382,10 +2388,4 @@
   bool found = false;
 
-  /* XXX: cur->name can be NULL in the registry.  
-   *      Should we allow for a way to search for that? 
-   */
-  if(name == NULL)
-    return false;
-
   for(i=0; (i < num_values) && (found == false); i++)
   {
@@ -2394,6 +2394,8 @@
       return false;
 
-    if((cur->name != NULL)
-       && (strcasecmp(cur->name, name) == 0))
+    /* A NULL name signifies the "(default)" value for a key */
+    if(((name == NULL) && (cur->name == NULL))
+       || ((name != NULL) && (cur->name != NULL) 
+           && (strcasecmp(cur->name, name) == 0)))
     {
       found = true;
Index: trunk/pyregfi-distutils.py
===================================================================
--- trunk/pyregfi-distutils.py	(revision 255)
+++ trunk/pyregfi-distutils.py	(revision 256)
@@ -2,3 +2,3 @@
 
 from distutils.core import setup
-setup(name='pyregfi', version='0.1', package_dir={'':'python'}, packages=['pyregfi'])
+setup(name='pyregfi', version='1.0', package_dir={'':'python'}, packages=['pyregfi'])
Index: trunk/python/pyregfi/__init__.py
===================================================================
--- trunk/python/pyregfi/__init__.py	(revision 255)
+++ trunk/python/pyregfi/__init__.py	(revision 256)
@@ -509,5 +509,5 @@
         
         elif name == "modified":
-            ret_val = regfi.regfi_nt2unix_time(byref(self._base.contents.mtime))
+            ret_val = regfi.regfi_nt2unix_time(self._base.contents.mtime)
 
         else:
@@ -764,5 +764,5 @@
 
         elif name == "modified":
-            return regfi.regfi_nt2unix_time(byref(self._base.contents.mtime))
+            return regfi.regfi_nt2unix_time(self._base.contents.mtime)
 
         return getattr(self.file.contents, name)
Index: trunk/python/pyregfi/structures.py
===================================================================
--- trunk/python/pyregfi/structures.py	(revision 255)
+++ trunk/python/pyregfi/structures.py	(revision 256)
@@ -279,5 +279,5 @@
 
 regfi.regfi_find_value.argtypes = [POINTER(REGFI_FILE), POINTER(REGFI_NK),
-                                    c_char_p, POINTER(c_uint32)]
+                                   c_char_p, POINTER(c_uint32)]
 regfi.regfi_find_value.restype = c_bool
 
@@ -287,5 +287,5 @@
 
 regfi.regfi_get_value.argtypes = [POINTER(REGFI_FILE), POINTER(REGFI_NK),
-                                   c_uint32]
+                                  c_uint32]
 regfi.regfi_get_value.restype = POINTER(REGFI_VK)
 
Index: trunk/src/common.c
===================================================================
--- trunk/src/common.c	(revision 255)
+++ trunk/src/common.c	(revision 256)
@@ -25,7 +25,7 @@
 iconv_t conv_desc;
 
-const char* key_special_chars = ",\"\\/";
-const char* subfield_special_chars = ",\"\\|";
-const char* common_special_chars = ",\"\\";
+const char* key_special_chars = ",\"/";
+const char* subfield_special_chars = ",\"|";
+const char* common_special_chars = ",\"";
 
 #define REGLOOKUP_EXIT_OK       0
@@ -70,5 +70,5 @@
 /* Returns a newly malloc()ed string which contains original buffer,
  * except for non-printable or special characters are quoted in hex
- * with the syntax '\xQQ' where QQ is the hex ascii value of the quoted
+ * with the syntax '%QQ' where QQ is the hex ascii value of the quoted
  * character.  A null terminator is added, since only ascii, not binary,
  * is returned.
@@ -119,8 +119,9 @@
     }
     
-    if(str[i] < 32 || str[i] > 126 || strchr(special, str[i]) != NULL)
+    if(str[i] < 32 || str[i] > 126 
+       || str[i] == '%' || strchr(special, str[i]) != NULL)
     {
       num_written += snprintf(ret_val + num_written, buf_len - num_written,
-			      "\\x%.2X", str[i]);
+			      "%%%.2X", str[i]);
     }
     else
@@ -135,5 +136,5 @@
 /* Returns a newly malloc()ed string which contains original string, 
  * except for non-printable or special characters are quoted in hex
- * with the syntax '\xQQ' where QQ is the hex ascii value of the quoted
+ * with the syntax '%QQ' where QQ is the hex ascii value of the quoted
  * character.
  */
