{"id":23557464,"url":"https://github.com/dobro/erlang-imap-utf7","last_synced_at":"2025-07-28T12:35:08.605Z","repository":{"id":57506430,"uuid":"368557966","full_name":"DOBRO/erlang-imap-utf7","owner":"DOBRO","description":"IMAP UTF-7 encoding/decoding library for Erlang","archived":false,"fork":false,"pushed_at":"2021-05-19T16:46:06.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T14:45:20.708Z","etag":null,"topics":["erlang","imap","utf-7"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DOBRO.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}},"created_at":"2021-05-18T14:20:54.000Z","updated_at":"2023-11-19T06:15:06.000Z","dependencies_parsed_at":"2022-08-29T20:31:58.763Z","dependency_job_id":null,"html_url":"https://github.com/DOBRO/erlang-imap-utf7","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DOBRO%2Ferlang-imap-utf7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DOBRO%2Ferlang-imap-utf7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DOBRO%2Ferlang-imap-utf7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DOBRO%2Ferlang-imap-utf7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DOBRO","download_url":"https://codeload.github.com/DOBRO/erlang-imap-utf7/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442209,"owners_count":22071860,"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":["erlang","imap","utf-7"],"created_at":"2024-12-26T14:30:53.128Z","updated_at":"2025-05-15T23:30:57.270Z","avatar_url":"https://github.com/DOBRO.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imap_utf7\n\n[![imap_utf7 on Hex.pm](https://img.shields.io/hexpm/v/imap_utf7.svg?color=yellow)](https://hex.pm/packages/imap_utf7)\n[![CI Status](https://github.com/DOBRO/erlang-imap-utf7/workflows/Build/badge.svg?branch=master)](https://github.com/DOBRO/erlang-imap-utf7/actions?query=workflow%3ABuild+branch%3Amaster)\n[![Code coverage](https://codecov.io/gh/DOBRO/erlang-imap-utf7/branch/master/graph/badge.svg)](https://codecov.io/gh/DOBRO/erlang-imap-utf7)\n![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)\n\nThe library provides functions for encoding/decoding Erlang UTF-8 binaries to and from modified UTF-7 encoding\nin accordance with RFC 3501.\n\nFrom RFC 3501, section 5.1.3. \"[Mailbox International Naming Convention](https://datatracker.ietf.org/doc/html/rfc3501#section-5.1.3)\":\n\u003e By convention, international mailbox names in IMAP4rev1 are specified\n\u003e using a modified version of the UTF-7 encoding described in [UTF-7].\n\n## Functions\n\n### Encoding\n\n```erlang\nimap_utf7:encode(MailboxName) -\u003e MailboxNameEncoded\n  when\n    MailboxName         :: binary(),\n    MailboxNameEncoded  :: binary().\n```\n\nEncodes UTF-8 `MailboxName` and returns `MailboxNameEncoded` in a modified UTF-7 encoding.\n\n### Decoding\n\n```erlang\nimap_utf7:decode(MailboxNameEncoded) -\u003e MailboxName\n  when\n    MailboxNameEncoded  :: binary(),\n    MailboxName         :: binary().\n```\n\nDecodes UTF-7 `MailboxNameEncoded` end returns `MailboxName` in UTF-8 encoding.\n\n## Examples\n\nEncoding:\n\n```erlang\n\u003e imap_utf7:encode(\u003c\u003c\"Входящие\"/utf8\u003e\u003e).\n\u003c\u003c\"\u0026BBIERQQ+BDQETwRJBDgENQ-\"\u003e\u003e\n\n\u003e imap_utf7:encode(\u003c\u003c\"Boîte de réception\"/utf8\u003e\u003e).\n\u003c\u003c\"Bo\u0026AO4-te de r\u0026AOk-ception\"\u003e\u003e\n\n\u003e imap_utf7:encode(\u003c\u003c\"收件箱\"/utf8\u003e\u003e).\n\u003c\u003c\"\u0026ZTZO9nux-\"\u003e\u003e\n\n\u003e imap_utf7:encode(\u003c\u003c\"受信トレイ\"/utf8\u003e\u003e).\n\u003c\u003c\"\u0026U9dP4TDIMOwwpA-\"\u003e\u003e\n\n\u003e imap_utf7:encode(\u003c\u003c\"Inbox\"\u003e\u003e).\n\u003c\u003c\"Inbox\"\u003e\u003e\n```\n\nDecoding:\n\n```erlang\n\u003e imap_utf7:decode(\u003c\u003c\"\u0026BBIERQQ+BDQETwRJBDgENQ-\"\u003e\u003e).\n\u003c\u003c208,146,209,133,208,190,208,180,209,143,209,137,208,184,\n  208,181\u003e\u003e\n\n\u003e imap_utf7:decode(\u003c\u003c\"\u0026BBIERQQ+BDQETwRJBDgENQ-\"\u003e\u003e) =:= \u003c\u003c\"Входящие\"/utf8\u003e\u003e.\ntrue\n\n\u003e imap_utf7:decode(\u003c\u003c\"Bo\u0026AO4-te de r\u0026AOk-ception\"\u003e\u003e).\n\u003c\u003c\"Boîte de réception\"/utf8\u003e\u003e\n\n\u003e imap_utf7:decode(\u003c\u003c\"\u0026ZTZO9nux-\"\u003e\u003e) =:= \u003c\u003c\"收件箱\"/utf8\u003e\u003e.\ntrue\n\n\u003e imap_utf7:decode(\u003c\u003c\"\u0026U9dP4TDIMOwwpA-\"\u003e\u003e) =:= \u003c\u003c\"受信トレイ\"/utf8\u003e\u003e.\ntrue\n\n\u003e imap_utf7:decode(\u003c\u003c\"Inbox\"\u003e\u003e).\n\u003c\u003c\"Inbox\"\u003e\u003e\n```\n\n## Building and testing\n\n```bash\n# using rebar3:\n$ rebar3 compile\n$ rebar3 dialyzer\n$ rebar3 ct\n$ rebar3 cover\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobro%2Ferlang-imap-utf7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdobro%2Ferlang-imap-utf7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdobro%2Ferlang-imap-utf7/lists"}