{"id":29585750,"url":"https://github.com/stdbug/unicpp","last_synced_at":"2025-07-27T04:07:36.211Z","repository":{"id":51316386,"uuid":"340937417","full_name":"stdbug/unicpp","owner":"stdbug","description":"Just another C++ Unicode library","archived":false,"fork":false,"pushed_at":"2022-04-04T15:07:40.000Z","size":242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-20T00:36:05.203Z","etag":null,"topics":["c-plus-plus","cpp","cpp17","decoding","encoding","unicode","utf-16","utf-8"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdbug.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":"2021-02-21T15:42:41.000Z","updated_at":"2021-06-07T22:08:53.000Z","dependencies_parsed_at":"2022-09-13T09:12:04.411Z","dependency_job_id":null,"html_url":"https://github.com/stdbug/unicpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stdbug/unicpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdbug%2Funicpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdbug%2Funicpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdbug%2Funicpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdbug%2Funicpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdbug","download_url":"https://codeload.github.com/stdbug/unicpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdbug%2Funicpp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267298755,"owners_count":24065888,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c-plus-plus","cpp","cpp17","decoding","encoding","unicode","utf-16","utf-8"],"created_at":"2025-07-20T02:30:16.614Z","updated_at":"2025-07-27T04:07:36.191Z","avatar_url":"https://github.com/stdbug.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unicpp: Just another C++ Unicode library\n\n## Character manipulation and category detection functions (`unicpp/char_type.h`)\n```cpp\nbool isalpha(char32_t);\nbool isdigit(char32_t);\nbool isspace(char32_t);\n\n// one-to-one case mappings\nchar32_t toupper(char32_t);\nchar32_t tolower(char32_t);\n```\n\n## UTF-8 and UTF-16 encode/decode functions (`unicpp/utf8.h`, `unicpp/utf16.h`)\n\u0026#xFFFD; (U+FFFD) is used as a replacement character when invalid character/byte sequence is encountered\n\n### Strings validation/stats functions\n```cpp\nsize_t Utf8ValidPrefixLength(std::string_view);\nsize_t Utf8NumValidChars(std::string_view);\nsize_t Utf8NumCharsWithReplacement(std::string_view);\n```\n\n### Encoding/decoding functions\n```cpp\n// UTF-8\nconst std::wstring wide_string = L\"Some string\";\n\nstd::vector\u003cuint8_t\u003e encoded_utf8 = Utf8Bytes\u003cstd::vector\u003cuint8_t\u003e\u003e(wide_string);\nstd::wstring decoded_utf8 = Utf8Wstring\u003cstd::wstring\u003e(encoded_utf8);\nassert(wide_string == decoded_utf8);\n\n// UTF-16LE\nstd::vector\u003cuint8_t\u003e encoded_utf16le = Utf16LeBytes\u003cstd::vector\u003cuint8_t\u003e\u003e(wide_string);\nstd::wstring decoded_utf16le = Utf16LeWstring\u003cstd::wstring\u003e(encoded_utf16le);\nassert(wide_string == decoded_utf16le);\n\n// UTF-16BE\nstd::vector\u003cuint8_t\u003e encoded_utf16be = Utf16BeBytes\u003cstd::vector\u003cuint8_t\u003e\u003e(wide_string);\nstd::wstring decoded_utf16be = Utf16BeWstring\u003cstd::wstring\u003e(encoded_utf16be);\nassert(wide_string == decoded_utf16be);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdbug%2Funicpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdbug%2Funicpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdbug%2Funicpp/lists"}