Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

text-encoding

> 编程语言
Open source

Polyfill for the Encoding Living Standard's API

751 stars0 likes1 views
WebsiteGitHub

About

Polyfill for the Encoding Living Standard's API

text-encoding

This is a polyfill for the Encoding Living Standard API for the Web, allowing encoding and decoding of textual data to and from Typed Array buffers for binary data in JavaScript.

By default it adheres to the spec and does not support encoding to legacy encodings, only decoding. It is also implemented to match the specification's algorithms, rather than for performance. The intended use is within Web pages, so it has no dependency on server frameworks or particular module schemes.

Basic examples and tests are included.

Install

There are a few ways you can get and use the text-encoding library.

HTML Page Usage

Clone the repo and include the files directly:

xml
  
  

  

This is the only use case the developer cares about. If you want those fancy module and/or package manager things that are popular these days you should probably use a different library.

Package Managers

The package is published to npm and bower as text-encoding. Use through these is not really supported, since they aren't used by the developer of the library. Using require() in interesting ways probably breaks. Patches welcome, as long as they don't break the basic use of the files via `


To support the legacy encodings (which may be stateful), the
TextEncoder `encode()` method accepts an optional dictionary and
`stream` option, e.g. `encoder.encode(string, {stream: true});` This
is not needed for standard encoding since the input is always in
complete code points.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptencodingpolyfill

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言