buffer: add buffer.transcode

Add buffer.transcode(source, from, to) method. Primarily uses ICU
to transcode a buffer's content from one of Node.js' supported
encodings to another.

Originally part of a proposal to add a new unicode module. Decided
to refactor the approach towrds individual PRs without a new module.

Refs: https://github.com/nodejs/node/pull/8075
PR-URL: https://github.com/nodejs/node/pull/9038
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
James M Snell committed 2016-10-25 10:12:02 -07:00
1 parent 1cf55f806b
commit e8eaaa7724
9 files changed
+437 -39

No files matched your search

+1 -3
View File
@@ -20,9 +20,7 @@
'type': 'none',
'toolsets': [ 'target' ],
'direct_dependent_settings': {
'defines': [
'UCONFIG_NO_CONVERSION=1',
]
'defines': []
},
},
{