{"id":18113867,"url":"https://github.com/jezza/mutf8","last_synced_at":"2025-04-14T07:12:07.631Z","repository":{"id":57642224,"uuid":"163700570","full_name":"Jezza/mutf8","owner":"Jezza","description":"Basic support for mutf8 strings in Rust.","archived":false,"fork":false,"pushed_at":"2020-11-18T12:29:06.000Z","size":23,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T14:35:42.019Z","etag":null,"topics":["encoding","modified-utf8","mutf8","rust","string"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/Jezza.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-31T22:25:17.000Z","updated_at":"2024-12-15T09:28:44.000Z","dependencies_parsed_at":"2022-09-07T14:01:05.864Z","dependency_job_id":null,"html_url":"https://github.com/Jezza/mutf8","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jezza%2Fmutf8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jezza%2Fmutf8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jezza%2Fmutf8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jezza%2Fmutf8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jezza","download_url":"https://codeload.github.com/Jezza/mutf8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837285,"owners_count":21169374,"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":["encoding","modified-utf8","mutf8","rust","string"],"created_at":"2024-11-01T02:10:09.051Z","updated_at":"2025-04-14T07:12:07.596Z","avatar_url":"https://github.com/Jezza.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MUTF-8\n\n## Usage\n\n```rust\nfn main() {\n    let output: Cow\u003cu8\u003e = mutf8::utf8_to_mutf8(\"Hello, \\0World\");\n\n    // `output` contains no NUL bytes.\n}\n```\n\nThere's also a `MString` and `mstr` struct.  \nThese are the counterparts to `String` and `str` within the standard library.  \n\n```rust\nfn main() {\n    let data = mstr::from_utf8(b\"\\0\");\n\tassert_eq!(data.len(), 2);\n}\n```\n\n## About\nThis crate allows converting UTF-8 to and from MUTF-8.\n\nSome data formats, such as the JVM classfile, make use of an altered UTF-8 encoding.  \nThis one in particular is the MUTF-8 variant.\n\nIt allows a NUL byte to be encoded without using the NUL byte itself.  \n\n\n## WIP\n\nThe algorithm itself is done, and useable.  \nIt works as well as any other.  \n\nThe reason I still call this crate WIP is because of the two String structs.  \nI'm not happy with them.\n\nI do use this crate for a couple of projects, but _none_ of them make use of the structs themselves.  \n\nI typically use this crate as just a jump from a `[u8]` to a `Cow\u003cstr\u003e`.  \nSo, until I work out where I want to go with this crate, it's probably going to stay like this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjezza%2Fmutf8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjezza%2Fmutf8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjezza%2Fmutf8/lists"}