Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fix-latin1-to-utf8

Fdawgs727MIT2.0.1TypeScript support: included

Fix errors when converting Latin-1 encoded text to UTF-8

encoding, iso-8859-1, iso8859-1, latin-1, latin1, utf8, windows-1252, windows1252

readme

fix-latin1-to-utf8

GitHub release npm version CI Coverage status code style: Prettier

Node.js module to fix errors when converting Latin-1 encoded text to UTF-8

Overview

When converting Latin-1 (or Windows-1252) encoded text to UTF-8, some characters may be incorrectly converted. This module fixes those errors.

Installation

Install using npm:

npm i fix-latin1-to-utf8

API

API documentation can be found here.

Example usage

const fixLatin1ToUtf8 = require("fix-latin1-to-utf8");

const latin1String =
    "This is a UTF-8 string that was converted from Latin-1‚ but the conversion was not great.";
const utf8String = fixLatin1ToUtf8(latin1String);

console.log(utf8String);
// This is a UTF-8 string that was converted from Latin-1, but the conversion was not great.

Contributing

Contributions are welcome, and any help is greatly appreciated!

See the contributing guide for details on how to get started. Please adhere to this project's Code of Conduct when contributing.

Acknowledgements

License

fix-latin1-to-utf8 is licensed under the MIT license.

changelog

Changelog

2.0.1 (2025-02-06)

Continuous integration

  • automerge: flush buffer to disk (3796127)

Dependencies

Documentation

Miscellaneous

  • use impersonal language (d52108e)

2.0.0 (2025-01-13)

⚠ BREAKING CHANGES

  • requires node 20 for testcontext assert

Continuous integration

  • cd: migrate to manifest config (c8f4158)
  • ci: use major tag for coverallsapp/github-action (17584b4)
  • deps: bump coverallsapp/github-action from 2.3.0 to 2.3.1 (#32) (9636f6d)
  • deps: bump coverallsapp/github-action from 2.3.1 to 2.3.4 (#33) (6231740)
  • release-please: declare schema (d8fd101)

Dependencies

  • deps-dev: bump dev dependencies (6a66c88)
  • migrate from jest to native node:test (#24) (807e3d5)

Documentation

  • readme: rename ci badge to reflect workflow (58fdebb)
  • readme: rename correct badge (815e43d)

Miscellaneous

  • .npmrc: enforce strict engine checks (75b8407)
  • .npmrc: remove excess whitespace (fe82789)
  • license: update license year (2561019)
  • tsconfig: set schema (3801ee6)

1.0.3 (2024-07-29)

Continuous integration

  • cd: sort release note sections alphabetically (21188b0)
  • ci: add node 22 to test matrix (9d7e312)
  • ci: audit package signatures and provenance attestations (23d3ca1)
  • deps: bump coverallsapp/github-action from 2.2.3 to 2.3.0 (#15) (80cdd17)
  • deps: bump wagoid/commitlint-github-action from 5 to 6 (#8) (9377e03)
  • use latest node lts version (465ce4c)

Dependencies

  • deps-dev: bump dev dependencies (7dc93ed)

Miscellaneous

  • .husky/commit-msg: remove npx usage (036e33f)
  • index: correct inline export comment (94f3925)
  • package: change author email (e73b84f)
  • package: use shorter semver syntax (6ce9edd)
  • tsconfig: update target to ES2023 (0a89a8d)

1.0.2 (2024-03-12)

Dependencies

  • deps-dev: bump dev dependencies (603e2e2)
  • deps-dev: bump dev dependencies (b57914d)
  • deps-dev: bump the commitlint group with 2 updates (#5) (8883f87)

Miscellaneous

  • stop types being committed (ddb0ae6)
  • tsconfig: enable strict type checking (78f7c92)

Continuous integration

  • cd: standardise @fdawgs cd workflows (b7fd16b)
  • ci: standardise @fdawgs ci workflows (d2f1d41)
  • dependabot: add [@eslint-community](https://github.com/eslint-community) scoped deps to eslint group (6ad2af7)
  • dependabot: remove redundant ignore (e6a781a)

Documentation

  • readme: refer to type defs (13425d8)

1.0.1 (2024-01-30)

Documentation

  • readme: clarify on encoding (d128e81)

1.0.0 (2024-01-30)

Miscellaneous