[Pkg-javascript-commits] [node-iconv] 01/02: Update glic patch
Jérémy Lal
kapouer at moszumanska.debian.org
Sat Oct 8 17:31:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
kapouer pushed a commit to branch master
in repository node-iconv.
commit a218943844ce9d474be07f20448ec60eb7e7fefd
Author: Jérémy Lal <kapouer at melix.org>
Date: Sat Oct 8 19:30:54 2016 +0200
Update glic patch
---
debian/patches/use-glibc-iconv.patch | 37 +++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/debian/patches/use-glibc-iconv.patch b/debian/patches/use-glibc-iconv.patch
index a154fab..d58fd2c 100644
--- a/debian/patches/use-glibc-iconv.patch
+++ b/debian/patches/use-glibc-iconv.patch
@@ -1,15 +1,15 @@
Description: use system iconv from glibc
1) do not build bundled iconv
2) work around eglibc libiconv implementation, that is:
- * do not throw when //ignore is on
- * set C.UTF-8 locale to get previsible //translit behavior;
- this is possible because C locale is portable (setlocale(3)),
- and transliteration need UTF-8 code-set to work the same as
- upstream's libiconv tested behavior.
+ * do not throw when //translit is on
+ * set locale to "" to get previsible //translit behavior (previously
+ it was C.UTF-8), this is possible because C locale is portable
+ (setlocale(3)), and transliteration need UTF-8 code-set to work
+ the same as upstream's libiconv tested behavior.
* codepages CP858 CP853 CP943 are not available
Forwarded: not-needed
Author: Jérémy Lal <kapouer at melix.org>
-Last-Update: 2016-09-10
+Last-Update: 2016-10-08
--- a/src/binding.cc
+++ b/src/binding.cc
@@ -14,13 +14,14 @@
@@ -30,14 +30,14 @@ Last-Update: 2016-09-10
#ifndef ICONV_CONST
#define ICONV_CONST
-@@ -98,6 +99,7 @@
+@@ -64,6 +65,7 @@
- static NAN_METHOD(Convert)
+ static void Initialize(Handle<Object> obj)
{
-+ setlocale(LC_CTYPE,"C.UTF-8");
- Iconv* iv = static_cast<Iconv*>(
- Nan::GetInternalFieldPointer(info[0].As<Object>(), 0));
- const bool is_flush = info[8]->BooleanValue();
++ setlocale(LC_ALL, "");
+ Local<ObjectTemplate> t = Nan::New<ObjectTemplate>();
+ t->SetInternalFieldCount(1);
+ object_template.Reset(t);
--- a/lib/iconv.js
+++ b/lib/iconv.js
@@ -45,15 +45,18 @@
@@ -75,7 +75,18 @@ Last-Update: 2016-09-10
if (context === null || input === FLUSH) {
--- a/test/test-basic.js
+++ b/test/test-basic.js
-@@ -142,10 +142,10 @@
+@@ -132,20 +132,17 @@
+ iconv = new Iconv('utf-8', 'ascii//translit');
+ assert.equal(iconv.convert('ça va').toString(), 'ca va');
+
+-iconv = new Iconv('utf-8', 'ascii//translit');
+-assert.throws(function() { iconv.convert('ça va が'); }); // untranslatable
+-
+ iconv = new Iconv('utf-8', 'ascii//translit//ignore');
+-assert.equal(iconv.convert('ça va が').toString(), 'ca va ');
++assert.equal(iconv.convert('ça va が').toString(), 'ca va ?');
+
+ iconv = Iconv('utf-8', 'iso-8859-1');
assert.equal(iconv.convert('b2s=', 'base64').toString(), 'ok');
var aixEncodings =
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-iconv.git
More information about the Pkg-javascript-commits
mailing list