1.0.2 • Published 1 year ago

windows-1250-codes v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.