Socket
Socket
Sign inDemoInstall

buffer-encoding

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    buffer-encoding

Convert buffers across different encodings, with encoding detection support.


Version published
Weekly downloads
31
increased by93.75%
Maintainers
1
Install size
1.69 MB
Created
Weekly downloads
 

Readme

Source

buffer-encoding

Convert buffers across different encodings, with encoding detection support.

Built on top of encoding and jschardet.

var convert = require('buffer-encoding').convert

var buf = convert(someBuf, 'gb2312', 'utf8') // utf8 => gb2312
var buf = convert(someBuf, 'utf8', 'gb2312') // gb2312 => utf8

var buf = convert(someStr, 'utf8', 'gb2312') // or string input instead

var buf = convert(someBuf, 'utf8') // even with encoding detection
var buf = convert(someBuf) // whatever => utf8
convert(bufferOrString, [toEncoding], [fromEncoding])

FAQs

Last updated on 17 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc