]> git.sven.stormbind.net Git - sven/fuse-exfat.git/commitdiff
Add debian/patches/utf16-fix - fix handling of characters beyond BMP. Thanks to Vladi...
authorSven Hoexter <sven@timegate.de>
Mon, 21 May 2012 19:02:39 +0000 (21:02 +0200)
committerSven Hoexter <sven@timegate.de>
Mon, 21 May 2012 19:02:39 +0000 (21:02 +0200)
debian/changelog
debian/patches/series
debian/patches/utf16-fix [new file with mode: 0644]

index fa07f49e438d9f94469a62ab94527fa52572c7b5..1a335e010bb7989401b386836a6a81980c01d12e 100644 (file)
@@ -8,6 +8,8 @@ fuse-exfat (0.9.7-2) UNRELEASED; urgency=low
     integration with the automount functionality in thunar.
     Thanks to Bob Valantin <valantin89@gmail.com>. (Closes: #673517)
   * Add debian/patches/honor-cppflags - scons should use exported CPPFLAGS.
+  * Add debian/patches/utf16-fix - fix handling of characters beyond BMP.
+    Thanks to Vladimir Serbinenko <phcoder@gmail.com>.
 
  -- Sven Hoexter <hoexter@debian.org>  Thu, 17 May 2012 14:47:47 +0200
 
index 06c25e169c3c9b9f8b21264b8d4b2ed7beb9e6fa..e3ec1be4165aa2c5084e870a62169d3311d3a2e8 100644 (file)
@@ -1 +1,2 @@
 honor-cppflags
+utf16-fix
diff --git a/debian/patches/utf16-fix b/debian/patches/utf16-fix
new file mode 100644 (file)
index 0000000..10bce32
--- /dev/null
@@ -0,0 +1,22 @@
+Applied upstream in r283.
+http://code.google.com/p/exfat/source/detail?r=283
+Closes Debian bug #672898.
+Thanks to Vladimir Serbinenko <phcoder@gmail.com>.
+--- a/libexfat/utf.c
++++ b/libexfat/utf.c
+@@ -89,6 +89,7 @@ static const le16_t* utf16_to_wchar(cons
+                       return NULL;
+               *wc = ((wchar_t) (le16_to_cpu(input[0]) & 0x3ff) << 10);
+               *wc |= (le16_to_cpu(input[1]) & 0x3ff);
++              *wc += 0x10000;
+               return input + 2;
+       }
+       else
+@@ -186,6 +187,7 @@ static le16_t* wchar_to_utf16(le16_t* ou
+       }
+       if (outsize < 2)
+               return NULL;
++      wc -= 0x10000;
+       output[0] = cpu_to_le16(0xd800 | ((wc >> 10) & 0x3ff));
+       output[1] = cpu_to_le16(0xdc00 | (wc & 0x3ff));
+       return output + 2;