{"id":19325265,"url":"https://github.com/preco21/stringconvert","last_synced_at":"2025-04-22T20:31:28.743Z","repository":{"id":22294375,"uuid":"25629125","full_name":"preco21/StringConvert","owner":"preco21","description":"A simple C++11 based helper for converting string between a various charset","archived":false,"fork":false,"pushed_at":"2017-08-11T09:21:51.000Z","size":13,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-18T23:29:53.670Z","etag":null,"topics":["c-plus-plus","charset","decode","encode","unicode"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preco21.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":"2014-10-23T09:20:38.000Z","updated_at":"2024-07-26T02:38:50.000Z","dependencies_parsed_at":"2022-08-21T01:00:25.465Z","dependency_job_id":null,"html_url":"https://github.com/preco21/StringConvert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preco21%2FStringConvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preco21%2FStringConvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preco21%2FStringConvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preco21%2FStringConvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preco21","download_url":"https://codeload.github.com/preco21/StringConvert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250318715,"owners_count":21410983,"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":["c-plus-plus","charset","decode","encode","unicode"],"created_at":"2024-11-10T02:09:31.209Z","updated_at":"2025-04-22T20:31:28.480Z","avatar_url":"https://github.com/preco21.png","language":"C++","readme":"# StringConvert\n\n\u003e A simple C++11 based helper for converting string between a various charset\n\n**C++11 implemented compiler required**\n\n## Methods\n\n```c++\n// WBCS to MBCS\nstatic std::string wideStringToAnsiString(const std::wstring\u0026 wstring, const std::locale\u0026 locale = std::locale{\"\"});\n\n// MBCS to WBCS\nstatic std::wstring ansiStringToWideString(const std::string\u0026 string, const std::locale\u0026 locale = std::locale{\"\"});\n\n// UTF-8 -\u003e UTF-16\nstatic std::u16string u8StringToU16String(const std::string\u0026 u8String);\n\n// UTF-8 -\u003e UTF-32\nstatic std::u32string u8StringToU32String(const std::string\u0026 u8String);\n\n// UTF-16 -\u003e UTF-8\nstatic std::string u16StringToU8String(const std::u16string\u0026 u16String);\n\n// UTF-16 -\u003e UTF-32\nstatic std::u32string u16StringToU32String(const std::u16string\u0026 u16String);\n\n// UTF-32 -\u003e UTF-8\nstatic std::string u32StringToU8String(const std::u32string\u0026 u32String);\n\n// UTF-32 -\u003e UTF-16\nstatic std::u16string u32StringToU16String(const std::u32string\u0026 u32String);\n```\n\n## Usage\n\n```c++\n#include \"StringConvert.hpp\"\n#include \u003ciostream\u003e\n\nint main()\n{\n  std::cout \u003c\u003c StringConvert::wideStringToAnsiString(L\"히이이익!\") \u003c\u003c std::endl;\n  return 0;\n}\n```\n\n## Trouble Shooting\n\nSome cases you should set locales, see details:\n\n* http://en.cppreference.com/w/cpp/locale/setlocale\n* http://en.cppreference.com/w/cpp/locale/locale/global\n\n## License\n\n[Public Domain](http://unlicense.org/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreco21%2Fstringconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreco21%2Fstringconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreco21%2Fstringconvert/lists"}