{"id":15562744,"url":"https://github.com/sonsongithub/stringiconv","last_synced_at":"2025-03-29T05:10:48.121Z","repository":{"id":66551762,"uuid":"115758439","full_name":"sonsongithub/StringIconv","owner":"sonsongithub","description":"Decode bytes array to String using iconv.","archived":false,"fork":false,"pushed_at":"2018-04-21T09:37:42.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T14:47:15.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/sonsongithub.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":"2017-12-29T22:30:49.000Z","updated_at":"2018-04-21T09:37:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2349d43-9701-480e-9cbb-a35b5a8c45cd","html_url":"https://github.com/sonsongithub/StringIconv","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"47ffcbc24431eda96cee744b845ddf5956a0ccbd"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FStringIconv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FStringIconv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FStringIconv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FStringIconv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonsongithub","download_url":"https://codeload.github.com/sonsongithub/StringIconv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140588,"owners_count":20729802,"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-10-02T16:16:09.234Z","updated_at":"2025-03-29T05:10:48.090Z","avatar_url":"https://github.com/sonsongithub.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StringIconv\nDecode bytes array to String using iconv.\nFoundation.framework does not provide a simple decoding method \nthat discards illegal sequence or transliterate unsupported characters. StringIconv provides a feasible method that statisfies the problem.\n\n### case - from Data to String\n\n```\ndo {\n    let data = try Data(contentsOf: urlSourceFile)\n    let string = try String.decode(\n\t     data: data,\n\t     fromCode: \"SHIFT-JIS\",\n\t     discardIllegalSequence: true,\n\t     transliterate: false\n\t )\n} catch {\n    print(error.localizedDescription)\n}\n```\n\n### case - from Data to Data\n\n```\ndo {\n    let data = try Data(contentsOf: urlSourceFile)\n    let decoded: Data = try String.decode(\n        data: data,\n        toCode: \"UTF8\",\n        fromCode: \"SJIS\"\n    )\n} catch {\n    print(error.localizedDescription)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2Fstringiconv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonsongithub%2Fstringiconv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2Fstringiconv/lists"}