Skip to content

Commit

Permalink
[#625] Add guidelines on encoding strings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoaloi committed Jul 15, 2021
1 parent b8acba7 commit 28a997c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@ A good commit may look like this:
Request are not in a _reviewable_ state, yet. In this case, though,
a [Draft Pull Request][github-draft] should be used.

### Dealing with strings

Dealing with strings in Erlang can be tricky. Within the Erlang LS
project we try as much as possible to ensure proper Unicode handling
of strings. When converting lists of characters into binaries and
back, please use the utilities provided in the `els_utils` module:

```erlang
els_utils:to_list(Binary)
els_utils:to_binary(List)
```

You can also read
[here](https://adoptingerlang.org/docs/development/hard_to_get_right/#handling-strings-in-erlang)
for more information on the topic.

### Final Note

These CONTRIBUTING notes are partially inspired by the awesome ones of
Expand Down

0 comments on commit 28a997c

Please sign in to comment.