3

I am receiving this error message when I run mix test in my application:

** (Mix) Could not start application brcpfcnpj: 'bad encoding'

I understand that the error happens because I inserted some accented characters, but I was expecting this to work as Elixir support UTF-8 by default. This is my mix.exs file:

defmodule Brcpfcnpj.Mixfile do
  use Mix.Project

  def project do
    [app: :brcpfcnpj,
     version: "0.1.0",
     elixir: "~> 1.2",
     description: description,
     package: package,
     deps: deps]
  end

  def application do
    [applications: [:logger]]
  end

  defp deps do
    [{:earmark, "~> 0.2.1", only: :dev},
     {:ex_doc, "~> 0.11.4", only: :dev},
     {:inch_ex, "~> 0.5.1", only: :docs}]
  end

  defp description do
    """
    Coleção de funções para validação e formatação de CPF e CNPJ.

    Validation and format for brazilian id documents (CPF/CNPJ).
    """
  end

  defp package do
    [files: ~w(lib test config mix.exs README*),
     maintainers: ["William Gueiros"],
     licenses: ["Unlicense"],
     links: %{"GitHub" => "https://github.com/williamgueiros/Brcpfcnpj"}]
  end
end

The file encoding:

$ file -I mix.exs
mix.exs: text/plain; charset=utf-8
alfakini
  • 4,635
  • 2
  • 26
  • 35

0 Answers0