{"id":13620878,"url":"https://github.com/devstein/unicode-eth","last_synced_at":"2025-08-12T18:46:56.118Z","repository":{"id":39648268,"uuid":"444259662","full_name":"devstein/unicode-eth","owner":"devstein","description":"The Unicode Ethereum Project is an initiative to provide libraries and contracts for Unicode data, algorithms, and utilities for Ethereum developers.","archived":false,"fork":false,"pushed_at":"2023-04-17T17:19:10.000Z","size":1546,"stargazers_count":26,"open_issues_count":10,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-01T17:54:50.562Z","etag":null,"topics":["ethereum","solidity","strings","unicode","unicode-data","utf-8"],"latest_commit_sha":null,"homepage":"","language":"Solidity","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/devstein.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}},"created_at":"2022-01-04T02:21:47.000Z","updated_at":"2024-04-29T08:56:53.000Z","dependencies_parsed_at":"2024-08-01T21:54:05.393Z","dependency_job_id":null,"html_url":"https://github.com/devstein/unicode-eth","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.5,"last_synced_commit":"b2add8ae99306cfd08ab968eaf12110a0b7443aa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devstein/unicode-eth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstein%2Funicode-eth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstein%2Funicode-eth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstein%2Funicode-eth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstein%2Funicode-eth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devstein","download_url":"https://codeload.github.com/devstein/unicode-eth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devstein%2Funicode-eth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270117310,"owners_count":24530284,"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-08-12T02:00:09.011Z","response_time":80,"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":["ethereum","solidity","strings","unicode","unicode-data","utf-8"],"created_at":"2024-08-01T21:01:00.296Z","updated_at":"2025-08-12T18:46:56.078Z","avatar_url":"https://github.com/devstein.png","language":"Solidity","readme":"# Unicode Ethereum Project\n\nThe Unicode Ethereum Project is an initiative to provide libraries and contracts for Unicode data, algorithms, and utilities for Ethereum developers.\n\n_Want to support the Unicode Ethereum Project? Donate to the [Gitcoin Grant](https://gitcoin.co/grants/6583/unicode-ethereum-project)!_\n\n## Project Status\n\nThe Unicode Ethereum Project is under active development and has not been deployed the Ethereum Mainnet. We want to get sufficient feedback from the community before committing the resources required to deployed the Unicode Character Database to Ethereum. Please checkout [contributing](#contributing) to see how you can make an impact!\n\n\n| Contract    | Rinkeby                                                                                                                       | Ropsten                                                                                                                       | Polygon Mumbai                                                                                                                  | Polygon Mainnet | Ethereum Mainnet |\n| ----------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------- |\n| Unicode     | [0xA1263c98FA087dfc400003a1F0F8f154705edC53](https://rinkeby.etherscan.io/address/0xA1263c98FA087dfc400003a1F0F8f154705edC53) | [0xe1a5dc72931a1e9c75bfa50787ab0f8f3d666956](https://ropsten.etherscan.io/address/0xe1a5dc72931a1e9c75bfa50787ab0f8f3d666956) | [0xDdF956e33f238bE394787A4C04EF3038E3307802](https://mumbai.polygonscan.com/address/0xDdF956e33f238bE394787A4C04EF3038E3307802) | ❌               | ❌                |\n| UTF8Encoder | [0x11168016803F91611E4ff5a5cd6Db43D7C772707](https://rinkeby.etherscan.io/address/0x11168016803F91611E4ff5a5cd6Db43D7C772707) | [0x9fB43dc6c94763d7158E68da24BE6537Dfa4258a](https://ropsten.etherscan.io/address/0x9fB43dc6c94763d7158E68da24BE6537Dfa4258a) | [0xbC7b39ed8132064eCC00dfD8E5f07f3DD0b38d2B](https://mumbai.polygonscan.com/address/0xbC7b39ed8132064eCC00dfD8E5f07f3DD0b38d2B) | ❌               | ❌                |\n| UnicodeData | [0x37F0927Db2Bad67E708416F3C2FbaAC42A376741](https://rinkeby.etherscan.io/address/0x37F0927Db2Bad67E708416F3C2FbaAC42A376741) | ❌                                                                                                                             | ❌                                                                                                                               | ❌               | ❌                |\n\n## Motivation\n\nUnicode data and algorithms are essential to any major programming language. Solidity, like many lower-level programming languages, represent strings as a [UTF-8 encoded bytes](https://docs.soliditylang.org/en/v0.8.10/types.html#bytes-and-string-as-arrays) and does not natively support character-based operations like `length`, `charAt`, or `isLowercase`. There are popular third-party libraries for string manipulation, like https://github.com/Arachnid/solidity-stringutils, but none that provide information about the underlying Unicode characters. If you are building an application or contract that receives user input as strings, understanding user input is critical for any validation, sanitization, or standardization logic.\n\nUnlike libraries in other programming languages, Solidity contracts are _stateful_. This allows us to not only build out a Unicode Data API, like in other languages, but also store the [Unicode Character Database](https://www.unicode.org/reports/tr44/\n) on Ethereum. With the Unicode Character Database accessible within the Ethereum network, it empowers anyone to build out additional APIs and functionality on top of the Unicode Character Database.\n\nAs mentioned before, Unicode data and libraries are essential for any major programming language and the Unicode Ethereum Project could not have been possible with out the rich, open source Unicode ecosystem. A few notable projects that helped in getting the Unicode Ethereum Project off the ground were\n\n- https://icu.unicode.org/\n- https://github.com/open-i18n/rust-unic/\n- https://docs.python.org/3/library/unicodedata.html\n\n## Functionality\n\n### Unicode (UTF-8) Library\n\n```solidity\nimport \"https://github.com/devstein/unicode-eth/contracts/Unicode.sol\";\n\ncontract MyContract {\n  using Unicode for string;\n\n  function simpleEmailVerification(string calldata _email) external pure returns (bool) {\n    // '@' exists and is not the first character\n    uint atSignIdx = _email.indexOf(\"@\");\n\n    if (atSignIdx == Unicode.CHAR_NOT_FOUND || atSignIdx == 0) return false;\n\n    // '.' exists and is after @\n    // NOTE: This is an naive example and would fail on valid email addresses like devin.stein@unicode.org\n    uint periodIdx = _email.indexOf(\".\");\n\n    if (periodIdx == Unicode.CHAR_NOT_FOUND ||  periodIdx \u003c atSignIdx) return false;\n\n    return true;\n  }\n}\n```\n\n### UTF8Encoder Library\n\nA library for encoding Unicode `uint32` code points their UTF-8 string representation.\n\n```solidity\nimport \"https://github.com/devstein/unicode-eth/contracts/UTF8Encoder.sol\";\n\ncontract MyContract {\n  using UTF8Encoder for uint32;\n\n  function codePointToString(uint32 _cp) external pure returns (string memory){\n    return _cp.UTF8Encode();\n  }\n}\n```\n\n### UnicodeData Contract\n\nAn API for the Unicode Character Database\n\n```solidity\n// TODO\n```\n\n\n## Contributing\n\nBuilding a new Unicode library and API is a massive undertaking and cannot be done alone! For the Unicode Ethereum Project to be successful, we will need the help of the Ethereum community. All contributions, small or large, are welcome! If you have an idea for feature, start [a discussion](https://github.com/devstein/unicode-eth/discussions) or make a pull-request.\n\n","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstein%2Funicode-eth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevstein%2Funicode-eth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevstein%2Funicode-eth/lists"}