{"id":18860780,"url":"https://github.com/leoovs/unipp","last_synced_at":"2025-10-14T03:21:44.893Z","repository":{"id":228675146,"uuid":"774633090","full_name":"leoovs/unipp","owner":"leoovs","description":"Iterator-based Unicode conversion","archived":false,"fork":false,"pushed_at":"2025-07-11T12:11:51.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-07-11T13:23:57.138Z","etag":null,"topics":["cpp","header-only","unipp","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoovs.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-19T22:24:19.000Z","updated_at":"2025-07-11T12:07:47.000Z","dependencies_parsed_at":"2024-03-23T12:41:28.602Z","dependency_job_id":"28ead185-6db1-4f9d-bfc4-9c469cd2a33a","html_url":"https://github.com/leoovs/unipp","commit_stats":null,"previous_names":["leoovs/unipp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leoovs/unipp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoovs%2Funipp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoovs%2Funipp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoovs%2Funipp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoovs%2Funipp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoovs","download_url":"https://codeload.github.com/leoovs/unipp/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoovs%2Funipp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017790,"owners_count":26086143,"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-10-14T02:00:06.444Z","response_time":60,"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":["cpp","header-only","unipp","utf-16","utf-8"],"created_at":"2024-11-08T04:26:45.415Z","updated_at":"2025-10-14T03:21:44.888Z","avatar_url":"https://github.com/leoovs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Uni++\n\nA convenient iterator-based C++17 header-only library that allows convertions\nbetween different Unicode Transformational Formats (UTFs).\n\nCurrently, it is possible to seamlessly convert between the following encodings:\n- UTF-8\n- UTF-16\n- UTF-32\n\n## Prerequisites\n\n- A C++17 confirming compiler (tested under __MSVC__ and __MinGW__)\n- CMake (optional)\n\n## How to integrate\n\nYou can use __Uni++__ simply by copying the `unipp/include` directory contents\ninto your third parties folder and specifying the appropriate include directory\nfor the compiler.\n\nHowever, __Uni++__ also integrates well with __CMake__ by providing an interface\ntarget. Here is the basic setup script:\n```CMake\nadd_subdirectory(\"unipp\")\n\nadd_executable(your_target)\n\ntarget_link_libraries(\n    your_target\n    # Usually, PUBLIC is more suitable for header-only libraries.\n    PUBLIC/PRIVATE/INTERFACE\n    unipp::unipp # Provides include dirs and a precompiled header file.\n)\n```\n\nUsing CPM is also an option:\n\n```CMake\nCPMAddPackage(\"gh:leoovs/unipp#dev\")\n```\n\n## How to use\n\nThe library provides a simple interface for working with the UTF-encoded\ncharacter sequences. It allocates very little and allows to specify custom\nallocators. Exceptions are not used. The library does not introduce any\nspecific types to store code units, it only relies on the standard types like\n`char` or `char16_t` and standard-defined semantics for those types, so you\ndon't have to type 'utf8' or 'utf16' everywhere (my personal preference), the\nonly exception is the `char` built-in type, see the __Remarks__ section below.\n\nHere's a basic use-case of __Uni++__:\n\n```C++\n#include \u003ciostream\u003e\n\n#include \u003cunipp/convert.hpp\u003e\n\nint main()\n{\n\tstd::u16string in = u\"Hello, world! Привет, мир! 哈囉世界! 👋🌎\";\n\tstd::string out; // `char`s assumed to be utilized as UTF-8 code units.\n\n\t// Based on the iterator `value_type`s the function peeks an appropriate\n\t// encoding algorithm.\n\tunipp::convert(in.begin(), in.end(), std::back_inserter(out));\n\n\tstd::cout \u003c\u003c out \u003c\u003c \" (\" \u003c\u003c out.length() \u003c\u003c \") bytes\\n\";\n}\n```\n\nMore use cases are available in the `example` folder, including the way to\nsupport Win32 wide characters.\n\n# Remarks\n\nThe `char` type assumed to be used as a code unit for UTF-8. This is due to the\nlack of C++20's `char8_t` which I don't want to introduce myself as a separate\nlibrary type due to the Occam's Razor. In practice, this should not cause any\nproblems, since the initialization of `char[]` is allowed from the UTF-8 string\nliterals. Note that `u8` string literals may behave _strange_ in __MSVC__ so check\nout the `cmake/CharSet.cmake` module that can enforce usage of UTF-8 as a source\ncharacter set.\n\n# Sources of information on UTF-8;16;32\n- cppreference.com articles on built-in types\n- Wikipedia articles on UTF-8 and UTF-16 encodings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoovs%2Funipp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoovs%2Funipp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoovs%2Funipp/lists"}