{"id":20590066,"url":"https://github.com/doist/doistx-normalize","last_synced_at":"2025-04-14T22:25:13.963Z","repository":{"id":36980378,"uuid":"367014358","full_name":"Doist/doistx-normalize","owner":"Doist","description":"Kotlin Multiplatform (KMP) library for string unicode normalization","archived":false,"fork":false,"pushed_at":"2024-04-11T12:54:14.000Z","size":1016,"stargazers_count":45,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T09:53:26.734Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/Doist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-13T10:31:07.000Z","updated_at":"2024-05-16T03:51:23.360Z","dependencies_parsed_at":"2023-01-17T11:30:25.861Z","dependency_job_id":"fe2d4cff-11c0-490b-8e2a-06bf821316f3","html_url":"https://github.com/Doist/doistx-normalize","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdoistx-normalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdoistx-normalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdoistx-normalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doist%2Fdoistx-normalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doist","download_url":"https://codeload.github.com/Doist/doistx-normalize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248970297,"owners_count":21191405,"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":[],"created_at":"2024-11-16T07:33:53.058Z","updated_at":"2025-04-14T22:25:13.947Z","avatar_url":"https://github.com/Doist.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doistx-normalize\n\n[![badge-version]](https://search.maven.org/search?q=g:com.doist.x%20a:normalize*)\n![badge-android][badge-android]\n![badge-jvm][badge-jvm]\n![badge-js][badge-js]\n![badge-ios][badge-ios]\n![badge-ios][badge-watchos]\n![badge-ios][badge-tvos]\n![badge-macos][badge-macos]\n![badge-windows][badge-windows]\n![badge-linux][badge-linux]\n\nKotlin Multiplatform (KMP) library that adds support for normalization as described by [Unicode Standard Annex #15 - Unicode Normalization Forms](https://unicode.org/reports/tr15/), by extending the `String` class with a `normalize(Form)` method.\n\nAll normalization forms are supported:\n- `Form.NFC`: Normalization Form C, canonical decomposition followed by canonical composition.\n- `Form.NFD`: Normalization Form D, canonical decomposition.\n- `Form.NFKC`: Normalization Form KC, compatibility decomposition followed by canonical composition.\n- `Form.NFKD`: Normalization Form KD, compatibility decomposition.\n\n## Usage\n\n```kotlin\n\"Äffin\".normalize(Form.NFC) // =\u003e \"Äffin\"\n\"Äffin\".normalize(Form.NFD) // =\u003e \"A\\u0308ffin\"\n\"Äffin\".normalize(Form.NFKC) // =\u003e \"Äffin\"\n\"Äffin\".normalize(Form.NFKD) // =\u003e \"A\\u0308ffin\"\n\n\"Henry \\u2163\".normalize(Form.NFC) // =\u003e \"Henry \\u2163\"\n\"Henry \\u2163\".normalize(Form.NFD) // =\u003e \"Henry \\u2163\"\n\"Henry \\u2163\".normalize(Form.NFKC) // =\u003e \"Henry IV\"\n\"Henry \\u2163\".normalize(Form.NFKD) // =\u003e \"Henry IV\"\n```\n\n## Setup\n\n```kotlin\nrepositories {\n   mavenCentral()\n}\n\nkotlin {\n   sourceSets {\n      val commonMain by getting {\n         dependencies {\n            implementation(\"com.doist.x:normalize:1.2.0\")\n         }\n      }\n   }\n}\n```\n\n## Development\n\nBuilding this project can be tricky, as cross-compilation in KMP not widely supported. In this case:\n- macOS and iOS targets must be built on macOS.\n- Windows targets should be built on Windows (or a JDK under [Wine](https://www.winehq.org/)).\n- Linux targets must be built on Linux due depending on `libunistring`.\n- JVM/Android and JS targets can be cross-compiled.\n\nThe defaults can be adjusted using two [project properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties):\n- `targets` is a string for which targets to build, test, or publish, depending on the task that runs.\n   - `all` (default): All possible targets in the current host.\n   - `native`: Native targets only (e.g., on macOS, that's macOS, iOS, watchOS and tvOS).\n   - `common`: Common targets only (e.g., JVM, JS, Wasm).\n   - `host`: Host OS only.\n- `publishRootTarget` is a boolean that indicates whether the [`kotlinMultiplatform` root publication](https://kotlinlang.org/docs/mpp-publish-lib.html#structure-of-publications) is included when publishing enabled targets (can only be done once).\n\nWhen targets are built, tested and published in CI/CD, the Apple host handles Apple-specific targets, the Windows host handles Windows, and Linux handles everything else.\n\n## Release\n\nTo release a new version, ensure `CHANGELOG.md` is up-to-date, and push the corresponding tag (e.g., `v1.2.3`). GitHub Actions handles the rest.\n\n## License\n\nReleased under the [MIT License](https://opensource.org/licenses/MIT).\n\nUnicode's normalization test suite is subject to [this license](https://github.com/unicode-org/icu/blob/main/LICENSE).\n\n[badge-version]: https://img.shields.io/maven-central/v/com.doist.x/normalize?style=flat\n[badge-android]: https://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat\n[badge-ios]: https://img.shields.io/badge/platform-ios-CDCDCD.svg?style=flat\n[badge-js]: https://img.shields.io/badge/platform-js-F8DB5D.svg?style=flat\n[badge-jvm]: https://img.shields.io/badge/platform-jvm-DB413D.svg?style=flat\n[badge-linux]: https://img.shields.io/badge/platform-linux-2D3F6C.svg?style=flat\n[badge-windows]: https://img.shields.io/badge/platform-windows-4D76CD.svg?style=flat\n[badge-macos]: https://img.shields.io/badge/platform-macos-111111.svg?style=flat\n[badge-watchos]: https://img.shields.io/badge/platform-watchos-C0C0C0.svg?style=flat\n[badge-tvos]: https://img.shields.io/badge/platform-tvos-808080.svg?style=flat\n[badge-wasm]: httpss://img.shields.io/badge/platform-wasm-624FE8.svg?style=flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fdoistx-normalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoist%2Fdoistx-normalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoist%2Fdoistx-normalize/lists"}