{"id":37439079,"url":"https://github.com/sciencesakura/mutf-8","last_synced_at":"2026-01-16T06:43:16.803Z","repository":{"id":48506438,"uuid":"304109065","full_name":"sciencesakura/mutf-8","owner":"sciencesakura","description":"A TypeScript/JavaScript library for encoding and decoding Modified UTF-8, the character encoding variant used in the Java platform for class files, object serialization, and other Java technologies.","archived":false,"fork":false,"pushed_at":"2025-08-10T07:51:11.000Z","size":646,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-02T02:00:04.963Z","etag":null,"topics":["charset","encoding","java","mutf-8","mutf8"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sciencesakura.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-14T18:59:55.000Z","updated_at":"2025-08-10T07:51:13.000Z","dependencies_parsed_at":"2022-09-04T15:03:40.301Z","dependency_job_id":"4365d3ec-7a5c-418c-b6f2-29489c587c82","html_url":"https://github.com/sciencesakura/mutf-8","commit_stats":{"total_commits":39,"total_committers":1,"mean_commits":39.0,"dds":0.0,"last_synced_commit":"9e4521a04aadeea4a1d1804a4ac41457d6714c7e"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/sciencesakura/mutf-8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciencesakura%2Fmutf-8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciencesakura%2Fmutf-8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciencesakura%2Fmutf-8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciencesakura%2Fmutf-8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sciencesakura","download_url":"https://codeload.github.com/sciencesakura/mutf-8/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sciencesakura%2Fmutf-8/sbom","scorecard":{"id":804628,"data":{"date":"2025-08-11","repo":{"name":"github.com/sciencesakura/mutf-8","commit":"8f27e1896b0852719f1dcb047864e4d50410bcb3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"19 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish-docs.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yaml:4"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-docs.yaml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/publish-docs.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-docs.yaml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/publish-docs.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-docs.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/publish-docs.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/publish.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/sciencesakura/mutf-8/publish.yaml/master?enable=pin","Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:1: pin your Docker image by updating node:22 to node:22@sha256:3266bc9e8bee1acc8a77386eefaf574987d2729b8c5ec35b0dbd6ddbc40b0ce2","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   3 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T11:26:34.288Z","repository_id":48506438,"created_at":"2025-08-23T11:26:34.288Z","updated_at":"2025-08-23T11:26:34.288Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["charset","encoding","java","mutf-8","mutf8"],"created_at":"2026-01-16T06:43:16.715Z","updated_at":"2026-01-16T06:43:16.787Z","avatar_url":"https://github.com/sciencesakura.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mutf-8: An Encoder and Decoder for Modified UTF-8\n\n![](https://github.com/sciencesakura/mutf-8/actions/workflows/build.yaml/badge.svg) [![npm version](https://badge.fury.io/js/mutf-8.svg)](https://badge.fury.io/js/mutf-8)\n\nA TypeScript/JavaScript library for encoding and decoding Modified UTF-8, the character encoding variant used in the Java platform for class files, object serialization, and other Java technologies.\n\n## What is Modified UTF-8?\n\nModified UTF-8 is a variant of UTF-8 encoding used internally by the Java platform. It differs from standard UTF-8 in the following ways:\n\n- **Null character**: The null character U+0000 is encoded as a 2-byte sequence 0xC0 0x80 instead of the single byte 0x00.\n- **Supplementary characters**: Characters whose code points are above U+FFFF are encoded as two 3-byte sequences instead of a single 4-byte sequence.\n\nSee [The Java Virtual Machine Specification, Java SE 21 Edition, Section 4.4.7](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.4.7) for more details.\n\n## Installation\n\nYou can install the mutf-8 library via npm or npm-compatible package managers. It comes in two packages:\n\n### Core Package\n\n```sh\nnpm install mutf-8\n```\n\n### Stream Package (Optional)\n\nFor streaming operations with large data sets:\n\n```sh\nnpm install mutf-8-stream\n```\n\n## Usage\n\nThe APIs are compatible with the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) standard, providing a simple interface for encoding and decoding Modified UTF-8.\n\n### Basic Encoding and Decoding\n\n```javascript\nimport { MUtf8Decoder, MUtf8Encoder } from \"mutf-8\";\n\nconst encoder = new MUtf8Encoder();\nconst decoder = new MUtf8Decoder();\n\n// Encode a string to Modified UTF-8 bytes\nconst text = \"Hello 世界! Santé🍻\";\nconst encoded = encoder.encode(text);\nconsole.log(encoded);\n// Uint8Array [\n//   0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0xe4, 0xb8,\n//   0x96, 0xe7, 0x95, 0x8c, 0x21, 0x20, 0x53, 0x61,\n//   0x6e, 0x74, 0xc3, 0xa9, 0xed, 0xa0, 0xbc, 0xed,\n//   0xbd, 0xbb\n// ]\n\n// Decode Modified UTF-8 bytes back to string\nconst decoded = decoder.decode(encoded);\nconsole.log(decoded); // \"Hello 世界! Santé🍻\"\n```\n\n### Error Handling\n\n```javascript\nimport { MUtf8Decoder } from \"mutf-8\";\n\n// Default behavior: replace invalid bytes with replacement character (U+FFFD)\nconst decoder = new MUtf8Decoder();\nconst invalidBytes = new Uint8Array([0xFF, 0xFE]);\nconsole.log(decoder.decode(invalidBytes)); // \"��\" (replacement characters)\n\n// Fatal mode: throw TypeError on invalid input\nconst strictDecoder = new MUtf8Decoder(\"mutf-8\", { fatal: true });\ntry {\n  strictDecoder.decode(invalidBytes);\n} catch (error) {\n  console.error(\"Decoding failed:\", error.message);\n}\n```\n\n### Stream API\n\nFor processing large amounts of data efficiently:\n\n```javascript\nimport { MUtf8DecoderStream, MUtf8EncoderStream } from \"mutf-8-stream\";\n\n// Encoding large text streams\nconst textStream = new ReadableStream({\n  start(controller) {\n    controller.enqueue(\"Large text chunk 1\");\n    controller.enqueue(\"Large text chunk 2\");\n    controller.close();\n  }\n});\n\nawait textStream\n  .pipeThrough(new MUtf8EncoderStream())\n  .pipeTo(new WritableStream({\n    write(chunk) {\n      console.log(\"Encoded chunk:\", chunk);\n    }\n  }));\n\n// Decoding large binary streams\nconst binaryStream = new ReadableStream({\n  start(controller) {\n    controller.enqueue(new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]));\n    controller.enqueue(new Uint8Array([0x20, 0xe4, 0xb8, 0x96, 0xe7]));\n    controller.enqueue(new Uint8Array([0x95, 0x8c, 0x21]));\n    controller.close();\n  }\n});\n\nawait binaryStream\n  .pipeThrough(new MUtf8DecoderStream())\n  .pipeTo(new WritableStream({\n    write(chunk) {\n      console.log(\"Decoded chunk:\", chunk);\n    }\n  }));\n```\n\nSee [API Documentation](https://sciencesakura.github.io/mutf-8/) for more details.\n\n## License\n\nThis library is licensed under the MIT License.\n\nCopyright (c) 2025 sciencesakura\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciencesakura%2Fmutf-8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsciencesakura%2Fmutf-8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsciencesakura%2Fmutf-8/lists"}