{"id":16716329,"url":"https://github.com/gucong3000/stdcp","last_synced_at":"2025-03-15T09:13:21.304Z","repository":{"id":57370421,"uuid":"161006653","full_name":"gucong3000/stdcp","owner":"gucong3000","description":"An effort to encapsulate the output code page used by the console of current process.","archived":false,"fork":false,"pushed_at":"2018-12-21T08:14:11.000Z","size":16,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T20:03:14.274Z","etag":null,"topics":["chcp","code-page","getconsoleoutputcp","setconsoleoutputcp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gucong3000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-09T05:12:48.000Z","updated_at":"2018-12-21T07:36:08.000Z","dependencies_parsed_at":"2022-08-29T16:42:20.401Z","dependency_job_id":null,"html_url":"https://github.com/gucong3000/stdcp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fstdcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fstdcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fstdcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gucong3000%2Fstdcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gucong3000","download_url":"https://codeload.github.com/gucong3000/stdcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707383,"owners_count":20334619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chcp","code-page","getconsoleoutputcp","setconsoleoutputcp"],"created_at":"2024-10-12T21:12:59.513Z","updated_at":"2025-03-15T09:13:21.274Z","avatar_url":"https://github.com/gucong3000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"stdcp\n====\n[![NPM version](https://img.shields.io/npm/v/stdcp.svg?style=flat-square)](https://www.npmjs.com/package/stdcp)\n[![AppVeyor](https://img.shields.io/appveyor/ci/gucong3000/stdcp.svg)](https://ci.appveyor.com/project/gucong3000/stdcp)\n[![Codecov](https://img.shields.io/codecov/c/github/gucong3000/stdcp.svg)](https://codecov.io/gh/gucong3000/stdcp)\n[![David](https://img.shields.io/david/gucong3000/stdcp.svg)](https://david-dm.org/gucong3000/stdcp)\n\nAn effort to encapsulate the output code page used by the console of current process.\n\nThis library provides native bindings for Windows APIs:\n- [GetACP](https://docs.microsoft.com/windows/desktop/api/winnls/nf-winnls-getacp)\n- [GetConsoleOutputCP](https://docs.microsoft.com/windows/console/getconsoleoutputcp)\n- [SetConsoleOutputCP](https://docs.microsoft.com/windows/console/setconsoleoutputcp)\n\n## Use Case\n\n```javascript\nconst stdcp = require(\"stdcp\");\n\n// Asynchronously APIs\n(async () =\u003e {\n  console.log(await stdcp.get(true))  // Get current Windows code page.\n  console.log(await stdcp.get())      // Get code page for current console.\n  await stdcp.set(65001);             // Set code page for current console.\n})();\n\n// Synchronously APIs\n(() =\u003e {\n  console.log(stdcp.getSync(true))  // Get current Windows code page.\n  console.log(stdcp.getSync())      // Get code page for current console.\n  stdcp.setSync(65001)              // Set code page for current console.\n})();\n```\n\n## Related\n- [Code Page Identifiers](https://docs.microsoft.com/windows/desktop/intl/code-page-identifiers)\n- [chcp](https://docs.microsoft.com/windows-server/administration/windows-commands/chcp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fstdcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgucong3000%2Fstdcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgucong3000%2Fstdcp/lists"}