You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

buffer-encoding

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

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
14
increased by16.67%
Maintainers
1
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

Package last updated on 17 Sep 2015

Did you know?

Socket

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
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc