{"id":13523274,"url":"https://github.com/flxbe/Din91379-csharp","last_synced_at":"2025-04-01T00:31:17.660Z","repository":{"id":139564018,"uuid":"545027080","full_name":"flxbe/Din91379-csharp","owner":"flxbe","description":"A C# implementation of DIN 91379","archived":false,"fork":false,"pushed_at":"2022-11-14T09:27:14.000Z","size":80,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-02T06:14:54.972Z","etag":null,"topics":["csharp","din-91379","string-latin"],"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/flxbe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-10-03T16:51:39.000Z","updated_at":"2023-10-26T09:49:22.000Z","dependencies_parsed_at":"2024-01-13T22:31:45.151Z","dependency_job_id":"6e4f0cc3-8dcf-4d0c-8596-79978aaa98bf","html_url":"https://github.com/flxbe/Din91379-csharp","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/flxbe%2FDin91379-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxbe%2FDin91379-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxbe%2FDin91379-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flxbe%2FDin91379-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flxbe","download_url":"https://codeload.github.com/flxbe/Din91379-csharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222688173,"owners_count":17023297,"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":["csharp","din-91379","string-latin"],"created_at":"2024-08-01T06:00:58.179Z","updated_at":"2024-11-02T07:31:30.576Z","avatar_url":"https://github.com/flxbe.png","language":"C#","funding_links":[],"categories":["Tooling for developers"],"sub_categories":["OZG Progress tracking"],"readme":"# Din91379-csharp\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/flxbe/Din91379/blob/main/LICENSE)\n[![ci](https://github.com/flxbe/Din91379/actions/workflows/CI.yml/badge.svg)](https://github.com/flxbe/Din91379/actions/workflows/CI.yml)\n[![nuget](https://img.shields.io/nuget/v/Din91379)](https://www.nuget.org/packages/Din91379)\n\nA C# implementation of [DIN 91379:2022-08](https://www.beuth.de/de/norm/din-91379/353496133), the replacement of\n[DIN SPEC 91379:2019-03](https://www.beuth.de/de/technische-regel/din-spec-91379/301228458)\n(also known as\n[String.Latin+ 1.2](https://www.xoev.de/sixcms/media.php/13/StringLatin%2012.zip)).\n\n- **Strict**: All data types are Unicode NFC normalized and contain only\n  characters and sequences from DIN 91379. Any string containing invalid\n  glyphs is rejected.\n- **Easy to use**: The data types have a familiar `string`-like interface. Normalization to Unicode NFC is done automatically.\n  The data types `TypeA`, `TypeB` and `TypeC` support the conversion to the canonical search form.\n- **Efficient**: The custom validation algorithm is **up to 4x faster** than using compiled regular expressions.\n- **Tested**: The implementation is fully tested against the complete `latinchars.xml` dataset as attached in\n  DIN SPEC 91379:2019-03, extended by the newly introduced characters in DIN 91379:2022-08.\n\n## Getting Started\n\nThe library is available as a [NuGet package](https://www.nuget.org/packages/Din91379/).\n\n```bash\ndotnet add package Din91379\n```\n\nInstances of the provided data types can be easily generated from `string` values.\n\n```csharp\nusing Din91379;\n\nTypeA name = TypeA.FromString(\"Nœl Schmidt-Strauß\");\nTypeB streetName = TypeB.FromString(\"Karl-Bröger Straße 17\");\n```\n\nUsing invalid characters will throw an error.\n\n```csharp\n// Din91379.InvalidGlyphException: Found invalid glyph '1' in 'Karl-Bröger Straße 17'\nTypeA.FromString(\"Karl-Bröger Straße 17\");\n```\n\nThe search form of a string can be derived for the data types `TypeA`, `TypeB` and `TypeC`.\n\n```csharp\nTypeA variant1 = TypeA.FromString(\"Nœl Schmidt-Strauß\");\nTypeA variant2 = TypeA.FromString(\"Noël Schmidt-Strauß\");\n\nConsole.WriteLine(variant1.GetSearchForm()); // Output: NOEL SCHMIDT-STRAUSS\nConsole.WriteLine(variant2.GetSearchForm()); // Output: NOEL SCHMIDT-STRAUSS\n```\n\n### Compatibility with DIN SPEC 91379\n\nDIN 91379:2022-08 added a few new characters which are not specified in\n[DIN SPEC 91379:2019-03](https://www.beuth.de/de/technische-regel/din-spec-91379/301228458).\nThe compatibility of a specific value with the replaced standard can be easily checked.\n\n```csharp\nTypeA value = TypeA.FromString(\"Hē̍llō̍\");\n\nConsole.WriteLine(value.IsDinSpec91379Compatible()); // Output: False\n```\n\n## License\n\nMIT License\n\nCopyright (c) 2022 Felix Bernhardt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflxbe%2FDin91379-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflxbe%2FDin91379-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflxbe%2FDin91379-csharp/lists"}