我在应用程序中运行mix test
时收到此错误消息:
**(混合)无法启动应用程序brcpfcnpj:'编码错误'
我理解错误的发生是因为我插入了一些重音字符,但我希望这可以作为Elixir默认支持UTF-8。这是我的mix.exs
文件:
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
文件编码:
$ file -I mix.exs
mix.exs: text/plain; charset=utf-8