{"id":30067665,"url":"https://github.com/nigelhorne/encode-wide","last_synced_at":"2025-08-08T09:03:59.214Z","repository":{"id":304379995,"uuid":"1018615286","full_name":"nigelhorne/Encode-Wide","owner":"nigelhorne","description":"Convert wide characters (Unicode) into HTML or XML-safe ASCII entities","archived":false,"fork":false,"pushed_at":"2025-08-07T11:53:19.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-07T13:35:49.910Z","etag":null,"topics":["cpan","cpan-module","encode","perl","perl5","unicode","utf-8"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/Encode::Wide","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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,"zenodo":null}},"created_at":"2025-07-12T16:40:40.000Z","updated_at":"2025-08-07T11:53:22.000Z","dependencies_parsed_at":"2025-07-30T18:32:02.575Z","dependency_job_id":null,"html_url":"https://github.com/nigelhorne/Encode-Wide","commit_stats":null,"previous_names":["nigelhorne/encode-wide"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nigelhorne/Encode-Wide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FEncode-Wide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FEncode-Wide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FEncode-Wide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FEncode-Wide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/Encode-Wide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2FEncode-Wide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269394406,"owners_count":24409776,"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-08T02:00:09.200Z","response_time":72,"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":["cpan","cpan-module","encode","perl","perl5","unicode","utf-8"],"created_at":"2025-08-08T09:02:11.946Z","updated_at":"2025-08-08T09:03:59.196Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nEncode::Wide - Convert wide characters (Unicode) into HTML or XML-safe ASCII entities\n\n# VERSION\n\n0.03\n\n# SYNOPSIS\n\n    use Encode::Wide qw(wide_to_html wide_to_xml);\n\n    my $html = wide_to_html(string =\u003e \"Café déjà vu – naïve façade\");\n    # returns: 'Caf\u0026eacute; d\u0026eacute;j\u0026agrave; vu \u0026ndash; na\u0026iuml;ve fa\u0026ccedil;ade'\n\n    my $xml = wide_to_xml(string =\u003e \"Café déjà vu – naïve façade\");\n    # returns: 'Caf\u0026#xE9; d\u0026#xE9;j\u0026#xE0; vu \u0026#x2013; na\u0026#xEF;ve fa\u0026#xE7;ade'\n\n# DESCRIPTION\n\nEncode::Wide provides functions for converting wide (Unicode) characters into ASCII-safe\nformats suitable for embedding in HTML or XML documents. It is especially useful\nwhen dealing with text containing accented or typographic characters that need\nto be safely represented in markup.\n\nThe module offers two exportable functions:\n\n- `wide_to_html(string =` $text)\u003e\n\n    Converts Unicode characters in the input string to their named HTML entities if available,\n    or hexadecimal numeric entities otherwise. Common characters such as \\`é\\`, \\`à\\`, \\`\u0026\\`, \\`\u003c\\`, \\`\u003e\\` are\n    converted to their standard HTML representations like \\`\u0026amp;eacute;\\`, \\`\u0026amp;agrave;\\`, \\`\u0026amp;amp;\\`, etc.\n\n- `wide_to_xml(string =` $text)\u003e\n\n    Converts all non-ASCII characters in the input string to hexadecimal numeric entities.\n    Unlike HTML, XML does not support many named entities, so this function ensures compliance\n    by using numeric representations such as \\`\u0026amp;#xE9;\\` for \\`é\\`.\n\n# PARAMETERS\n\nBoth functions accept a named parameter:\n\n- `string` — The Unicode string to convert.\n\n# ENCODING\n\nInput strings are expected to be valid UTF-8. If a byte string is passed, the module will attempt\nto decode it appropriately. Output is guaranteed to be pure ASCII.\n\n# EXPORT\n\nNone by default.\n\nOptionally exportable:\n\n    wide_to_html\n    wide_to_xml\n\n# SEE ALSO\n\n[HTML::Entities](https://metacpan.org/pod/HTML%3A%3AEntities), [Encode](https://metacpan.org/pod/Encode), [XML::Entities](https://metacpan.org/pod/XML%3A%3AEntities), [Unicode::Escape](https://metacpan.org/pod/Unicode%3A%3AEscape).\n\n[https://www.compart.com/en/unicode/](https://www.compart.com/en/unicode/).\n\n# AUTHOR\n\nNigel Horne \u003cnjh@nigelhorne.com\u003e\n\n# LICENCE AND COPYRIGHT\n\nCopyright 2025 Nigel Horne.\n\nUsage is subject to licence terms.\n\nThe licence terms of this software are as follows:\n\n- Personal single user, single computer use: GPL2\n- All other users (including Commercial, Charity, Educational, Government)\n  must apply in writing for a licence for use from Nigel Horne at the\n  above e-mail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fencode-wide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Fencode-wide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fencode-wide/lists"}