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

Package detail

windows-1250-codes

joker876737MIT1.0.2TypeScript support: included

Convert characters to windows-1250 codes and back.

windows-1250, encoding, windows, 1250, charcode, char, code

readme

windows-1250-codes

npm NPM npm bundle size

A converter from characters to windows-1250 codes and the other way around.

Installation

NodeJS

npm install windows-1250-codes --save

Browser

Import the script:

<script src="https://joker876.github.io/windows-1250-codes/windows-1250-codes.min.js">

Usage

import { charToCode, codeToChar } from 'windows-1250-codes';

Characters to codes

charToCode(char: string): number;

The 1charToCode1 function takes a single string argument char, representing the character to be converted.

It returns a number representing the Windows-1250 encoding code for the character, or -1 if the character is not supported by Windows-1250.

Codes to characters

codeToChar(code: number): string;

The codeToChar function takes a single number argument code, representing the Windows-1250 encoding code to be converted.

It returns a string representing the character corresponding to the Windows-1250 encoding code, or a placeholder character if the code is not supported by Windows-1250.