{"id":18716690,"url":"https://github.com/maxdz-gmbh/mdz_unicode","last_synced_at":"2026-02-13T15:07:22.740Z","repository":{"id":208427030,"uuid":"315693950","full_name":"maxdz-gmbh/mdz_unicode","owner":"maxdz-gmbh","description":"Very lightweight and portable ANSI C 89/90 compliant library for handling Unicode strings.","archived":false,"fork":false,"pushed_at":"2024-09-20T13:55:30.000Z","size":2109,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-01T08:37:46.677Z","etag":null,"topics":["android","c","freebsd","library","linux","macos","portable","strings","unicode-characters","unicode-support","unicode-symbols","utf-16","utf-32","utf-8","utf16","utf32","utf8","wchar-support","windows"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxdz-gmbh.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.txt","contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-11-24T16:43:29.000Z","updated_at":"2024-10-01T14:03:49.000Z","dependencies_parsed_at":"2024-12-28T11:15:17.324Z","dependency_job_id":null,"html_url":"https://github.com/maxdz-gmbh/mdz_unicode","commit_stats":null,"previous_names":["maxdz-gmbh/mdz_unicode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxdz-gmbh/mdz_unicode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdz-gmbh%2Fmdz_unicode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdz-gmbh%2Fmdz_unicode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdz-gmbh%2Fmdz_unicode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdz-gmbh%2Fmdz_unicode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxdz-gmbh","download_url":"https://codeload.github.com/maxdz-gmbh/mdz_unicode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxdz-gmbh%2Fmdz_unicode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29411138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["android","c","freebsd","library","linux","macos","portable","strings","unicode-characters","unicode-support","unicode-symbols","utf-16","utf-32","utf-8","utf16","utf32","utf8","wchar-support","windows"],"created_at":"2024-11-07T13:13:25.299Z","updated_at":"2026-02-13T15:07:22.721Z","avatar_url":"https://github.com/maxdz-gmbh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"**February 2024 NOTE:** This repo is obsolete. Please use [mdz_string] project/repo instead.\n\n**NOTE:** All 0.x releases are kind of \"alpha-versions\" without expectations of API backward-compatibility.\n\n## Table of Contents\n[mdz_unicode Overview](#mdz_unicode-Overview)\u003cbr\u003e\n[mdz_unicode Advantages](#mdz_unicode-Advantages)\u003cbr\u003e\n[mdz_unicode Usage](#mdz_unicode-Usage)\u003cbr\u003e\n[mdz_wchar Overview](#mdz_wchar-Overview)\u003cbr\u003e\n[mdz_utf8 Overview](#mdz_utf8-Overview)\u003cbr\u003e\n[mdz_utf16 Overview](#mdz_utf16-Overview)\u003cbr\u003e\n[mdz_utf32 Overview](#mdz_utf32-Overview)\u003cbr\u003e\n[Licensing info](#Licensing-info)\u003cbr\u003e\n[Credits](#Credits)\n\n## mdz_unicode Overview\n\nWiki: [mdz_unicode Wiki]\u003cbr\u003e\nfile: *\"mdz_unicode.h\"*\n\nPlease take a look at *\"mdz_unicode.h\"* file or [mdz_unicode Wiki] site for detailed functions descriptions.\n\n[mdz_unicode Wiki]: https://github.com/maxdz-gmbh/mdz_unicode/wiki/mdz_unicode-overview\n\n[mdz_unicode] - is a very lightweight, versatile and speedy C  library for handling Unicode strings, developed by [maxdz Software GmbH].The library supports UTF8, UTF16, UTF32, wchar strings. Source code of library is highly-portable, conforms to ANSI C 89/90 Standard. Builds for Win32/Win64, Linux, FreeBSD, Android, macOS are available.\n\nOnly shared/dynamically loaded libraries (*.so* and *.dll* files with import libraries) are available for evaluation testing purposes. Static libraries are covered by our commercial licenses.\n\n**Linux** binaries are built against Linux Kernel 2.6.18 - and thus should be compatible with Debian (from ver. 4.0), Ubuntu (from ver. 8.04), Fedora (from ver. 9)\n\n**FreeBSD** binaries - may be used from FreeBSD ver. 7.0\n\n**Win32** binaries are built using Visual Studio Platform Toolset \"v90\", thus are compatible with Windows versions from Windows 2000.\u003cbr\u003e\n**Win64** binaries are built using Visual Studio Platform Toolset \"v100\", thus are compatible with Windows versions from Windows XP.\u003cbr\u003e\n\n**Android** x86/armeabi-v7a binaries - may be used from Android API level 16 (\"Jelly Bean\" ver. 4.1.x)\u003cbr\u003e\n**Android** x86_64/arm64-v8a binaries - may be used from Android API level 21 (\"Lollipop\" ver. 5.0)\n\n**macOS** binaries - x86_64, from *MacOS X v10.6.0*\n\n[mdz_unicode]: https://github.com/maxdz-gmbh/mdz_unicode\n[maxdz Software GmbH]: https://maxdz.com/\n[mdz_string]: https://github.com/maxdz-gmbh/mdz_string\n\n## mdz_unicode Advantages\n\n**1. High portability:** the whole code conforms to ANSI C 89/90 Standard. Multithreading/asynchronous part is POSIX compatible (under UNIX/Linux).\n\n**2. Little dependencies:** basically *mdz_unicode* functions are only dependend on standard C-library memory-management/access functions. Multithreading part is dependend on POSIX *pthreads* API (under UNIX/Linux) and old process control/synchronization API (from Windows 2000). It means you can use library in your code withouth any further dependencies except standard platform libraries/APIs.\n\n**3. Extended error-checking:** all functions preserve internal error-code pointing the problem. It is possible to use strict error-checking (when all preserved error-codes should be *MDZ_ERROR_NONE*) or \"relaxed\"-checking - when only returned *mdz_false* will indicate error.\n\n**4. Extended control:** containers do only explicit operations. It means for example, when \"insert\" function is called with auto-reservation flag set in *mdz_false* - it will return error if there is not enough capacity in container. No implicit reservations will be made.\n\n**5. Attached usage:** strings should not necessarily use dynamically-allocated memory - which may be not available on your embedded system (or if malloc()/free() are forbidden to use in your safety-critical software). Just attach container/data to your statically-allocated memory and use all strings functionality.\n\n**6. Cache-friendly:** it is possible to keep controlling and data parts together in memory using \"embedded part\".\n\n**7. Unicode support:** UTF-8, UTF-16, UTF-32 are supported.\n\n**8. wchar_t support:** also wchar_t strings are supported, with 2 and 4 bytes-large *wchar_t* characters.\n\n**9. Endianness-aware containers:** utf16 and utf32 containers are endiannes-aware thus may be used to produce and manipulate strings with pre-defined endianness even if endianness of host differs.\n\n**10. Unicode \"surrogate-pairs\" awareness:** 2-byte Unicode strings correctly process/distinguish \"surrogate-pairs\" as 1 Unicode symbol.\n\n**11. Asynchronous execution:** *insert* functions can be executed asynchronously\n\n## mdz_unicode Usage\n\n**unicode** is implemented with strict input parameters checking. It means *mdz_false* or some other error indication will be returned if one or several input parameters are invalid - even if such an invalidity doesn't lead to inconsistence (for example adding or removing 0 items).\u003cbr\u003e\n\n**Test license generation:** - in order to get free test-license, please proceed to our Shop page [maxdz Shop] and register an account. After registration you will be able to obtain free 14-days test-licenses for our products using \"Obtain for free\" button. \nTest license data should be used in *mdz_unicode_init()* call for library initialization.\n\n**NOTE:** All 0.x releases are kind of \"beta-versions\" and can be used 1) only with test-license (during test period of 14 days, with necessity to re-generate license for the next 14 days test period) and 2) without expectations of interface backward-compatibility.\n\nSeveral usage-scenarios are possible:\n- low-level - raw C interface, using *mdz_unicode.h*, *mdz_utf8.h*, *mdz_utf16.h*, etc C-header files\n- higher-level - using *MdzUnicode*, *MdzUtf8*, *MdzUtf16*, etc C++ \"wrappers\" around C-header files functions\n\n[mdz_unicode Wiki]: https://github.com/maxdz-gmbh/mdz_unicode/wiki/mdz_unicode-overview\n[maxdz Shop]: https://maxdz.com/shop.php\n\n#### Code Example (low-level use)\n\n*mdz_unicode_init()* with license information should be called for library initialization before any subsequent calls:\n\n```\n#include \u003cmdz_unicode.h\u003e\n\nint main(int argc, char* argv[])\n{\n  /* mdz_unicode library initialization using test info retrieved after license generation (see \"Test license generation\" above) */\n  \n  mdz_bool bRet = mdz_unicode_init(\"\u003cfirst-name-hash\u003e\", \"\u003clast-name-hash\u003e\", \"\u003cemail-hash\u003e\", \"\u003clicense-hash\u003e\");\n  ...\n\n  mdz_ansi_uninit(); /* call for un-initialization of library */\n  \n  return 0;\n  \n}\n```\n\n[mdz_utf8_create]: https://github.com/maxdz-gmbh/mdz_unicode/wiki/mdz_utf8_create\n[mdz_utf8_destroy]: https://github.com/maxdz-gmbh/mdz_unicode/wiki/mdz_utf8_destroy\n\nAfter library initialization call *[mdz_utf8_create]*() for **utf8** string creation. There should be also symmetric *[mdz_utf8_destroy]*() call for every create, otherwise allocated for string memory remains occupied:\n\n```\n#include \u003cmdz_unicode.h\u003e\n#include \u003cmdz_utf8.h\u003e\n\nint main(int argc, char* argv[])\n{\n  mdz_bool bRet = mdz_unicode_init(\"\u003cfirst-name-hash\u003e\", \"\u003clast-name-hash\u003e\", \"\u003cemail-hash\u003e\", \"\u003clicense-hash\u003e\");\n  \n  // initialize pAnsi\n  \n  mdz_Utf8* pUtf8 = mdz_utf8_create(0); // create utf8-string\n  ...\n  ...\n  // use pUtf8\n  ...\n  ...\n  // destroy pUtf8\n  \n  mdz_utf8_destroy(\u0026pUtf8); // after this pUtf8 should be NULL\n  \n  mdz_ansi_uninit();\n  ...\n}\n```\n\nUse *mdz_Utf8** pointer for subsequent library calls:\n\n```\n#include \u003cmdz_unicode.h\u003e\n#include \u003cmdz_utf8.h\u003e\n\nint main(int argc, char* argv[])\n{\n  mdz_bool bRet = mdz_unicode_init(\"\u003cfirst-name-hash\u003e\", \"\u003clast-name-hash\u003e\", \"\u003cemail-hash\u003e\", \"\u003clicense-hash\u003e\");\n  \n  mdz_Utf8* pUtf8 = mdz_utf8_create(0); // create utf8-string\n\n  // reserve memory for 5 elements\n  \n  bRet = mdz_utf8_reserve(pUtf8, 5);\n  \n  // insert 'b' in front position with auto-reservation if necessary\n  \n  bRet = mdz_utf8_insertAnsi(pUtf8, 0, \"b\", 1, mdz_true); // \"b\" after this call\n  \n  // append string with \"cde\" with auto-reservation if necessary\n  \n  bRet = mdz_utf8_insert(pUtf8, (size_t) -1, \"cde\", 3, mdz_true); // \"bcde\" after this call\n  \n  ...\n  \n  mdz_utf8_destroy(\u0026pUtf8);\n  \n  mdz_ansi_uninit();\n  ...\n}\n```\n\n## mdz_wchar Overview\nWiki: [mdz_wchar Wiki]\u003cbr\u003e\nfile: *\"mdz_wchar.h\"*\n\nPlease take a look at *\"mdz_wchar.h\"* file or [mdz_wchar Wiki] site for detailed functions descriptions.\n\n[mdz_wchar Wiki]: https://github.com/maxdz-gmbh/mdz_containers/wiki/mdz_wchar-overview\n\n## mdz_utf8 Overview\nWiki: [mdz_utf8 Wiki]\u003cbr\u003e\nfile: *\"mdz_utf8.h\"*\n\nPlease take a look at *\"mdz_utf8.h\"* file or [mdz_utf8 Wiki] site for detailed functions descriptions.\n\n[mdz_utf8 Wiki]: https://github.com/maxdz-gmbh/mdz_containers/wiki/mdz_utf8-overview\n\n## mdz_utf16 Overview\nWiki: [mdz_utf16 Wiki]\u003cbr\u003e\nfile: *\"mdz_utf16.h\"*\n\nPlease take a look at *\"mdz_utf16.h\"* file or [mdz_utf16 Wiki] site for detailed functions descriptions.\n\n[mdz_utf16 Wiki]: https://github.com/maxdz-gmbh/mdz_containers/wiki/mdz_utf16-overview\n\n## mdz_utf32 Overview\nWiki: [mdz_utf32 Wiki]\u003cbr\u003e\nfile: *\"mdz_utf32.h\"*\n\nPlease take a look at *\"mdz_utf32.h\"* file or [mdz_utf32 Wiki] site for detailed functions descriptions.\n\n[mdz_utf32 Wiki]: https://github.com/maxdz-gmbh/mdz_containers/wiki/mdz_utf32-overview\n\n## Licensing info\n\nUse of **mdz_unicode** library is regulated by license agreement in *LICENSE.txt*\n\nBasically private non-commercial \"test\" usage is unrestricted. Commercial usage of library (incl. its source code) will be regulated by according license agreement.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdz-gmbh%2Fmdz_unicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxdz-gmbh%2Fmdz_unicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxdz-gmbh%2Fmdz_unicode/lists"}