Skip to content
gucong3000Public

About

An effort to encapsulate the output code page used by the console of current process.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

stdcp

NPM version AppVeyor Codecov David

An effort to encapsulate the output code page used by the console of current process.

This library provides native bindings for Windows APIs:

Use Case

const stdcp = require("stdcp");

// Asynchronously APIs
(async () => {
  console.log(await stdcp.get(true))  // Get current Windows code page.
  console.log(await stdcp.get())      // Get code page for current console.
  await stdcp.set(65001);             // Set code page for current console.
})();

// Synchronously APIs
(() => {
  console.log(stdcp.getSync(true))  // Get current Windows code page.
  console.log(stdcp.getSync())      // Get code page for current console.
  stdcp.setSync(65001)              // Set code page for current console.
})();

Related

About

An effort to encapsulate the output code page used by the console of current process.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages