IO.inspect outputs strange character ~c

I have code that looks like this:

groups =  [
          %{1 => 5},
          %{2 => 6},
          %{3 => 7},
          %{4 => 8}
        ]
    expanded_groups =
      groups
      |> Enum.map(fn members ->
        userids = Map.keys(members)
        ratings = Map.values(members)

        %{
          members: userids,
          ratings: ratings,
          group_rating: Enum.sum(ratings),
          count: Enum.count(ratings)
        }
      end)
    IO.inspect(expanded_groups, label: "expanded_groups")

The output in console is:

expanded_groups: [
  %{count: 1, ratings: [5], members: [1], group_rating: 5},
  %{count: 1, ratings: [6], members: [2], group_rating: 6},
  %{count: 1, ratings: ~c"\a", members: [3], group_rating: 7},
  %{count: 1, ratings: ~c"\b", members: [4], group_rating: 8}
]

What is the ~c"\a" ?

A list of integers is printed as a chartist if the integers are printable characters. See Inspect.Opts — Elixir v1.16.1 - the :charlists option. Welcome to the club - it’s like an initiation into Elixir! See Is there a way to inspect a list of integers without accidentally ending up with a charlist? for more info…

5 Likes