Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`parse` crashes when text is unicode

Open Beginner friendly
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
erlang
Domain
backend

Research direction

Start at xml2map_ffi:value_to_bin/1, where the issue identifies the failing conversion, and reproduce the provided unicode XML assertion through xml2map.parse. Done means the assertion returns Ok("β") without an Erlang badarg error; check the surrounding FFI behavior for regressions.

Written by the indexing model from the issue text.

Description

The following code crashes with erlang:error(Badarg):

let decoder =
  decode.field("#text", decode.string, decode.success)
  |> decode.field("unicode_test", _, decode.success)

assert Ok("β") == echo xml2map.parse("<unicode_test>β</unicode_test>", decoder)

I was able to patch it by using unicode:characters_to_binary/1 instead of list_to_binary/1 in xml2map_ffi:value_to_bin/1:

value_to_bin(Value) when is_list(Value) ->
-  list_to_binary(Value);
+  unicode:characters_to_binary(Value);
Dominant language
Erlang
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.