~bitfehler/m2dir

72f8841a7c39f3ea51418476bd5eae4ccb3cbe5b — Conrad Hoffmann 3 months ago 6009dab master
Specify encoding for folder names if required
1 files changed, 29 insertions(+), 0 deletions(-)

M index.md
M index.md => index.md +29 -0
@@ 79,6 79,35 @@ merely check for the file's presence. Future versions of the spec may use the
marker file's content, e.g. to indicate support for a revised version of the
spec.

## Folder names

The only constraints imposed on folder names by the m2dir specification is that
they must be representable as a valid UTF-8 string, must not be empty, and must
not start with a dot (`.`).

However, further contstraints may be imposed by the underlying filesystem
and/or operating system. In such circumstances, an application creating a
folder **may** chose to perform percent-encoding of certain characters, as
described in [RFC 3986, section 2][pctenc]. In the name of legibility of
directory names on the filesystem, applications **should** be conservative in
their choice of characters to encode.

[pctenc]: https://datatracker.ietf.org/doc/html/rfc3986#section-2

Due to the above rule, a percent sign (`%`) in a folder name **must** always
be percent-encoded (`%25`).

When creating a folder, an application **may** choose to throw an error
instead, if the underlying filesystem does not accept a folder name. However,
_if_ an application chooses to do any kind of encoding, it **must** be
percent-encoding. All applications performing synchronization to any kind of
remote mail store **must** support percent-encoded folder names.

As stated in the RFC,

> For consistency, URI producers and normalizers **should** use uppercase
> hexadecimal digits for all percent-encodings.

## Default delivery target
[default]: #default-delivery-target