appprova / custom_words

MIT License
1 stars 1 forks source link

Psych::SyntaxError: (config/custom_words.yml): invalid trailing UTF-8 octet at line 1 column 1 #1

Closed martinstiago closed 7 years ago

martinstiago commented 9 years ago

It looks like the gem is not handling yml files with UTF-8 caracters. My custom_words.yml is

intro_text: "Bem-vindo ao AdaptiConcluinte dos cursos de Engenharia, Arquitetura e Urbanismo, Sistemas de Informação, Ciência da computação." intro_video: "" school: "Instituição - Campus - Curso" grade: "Período"

Can you help me out with this error?

jdanielnd commented 9 years ago

Hm, that's weird! YAML doesn't provide a way to specify the encoding since it only deals with UTF-8 and UTF-16. Also, it says that the invalid trailing octet is at line 1 column 1 which doesn't match with any special character.

Can you please try to save the YAML file in UTF-8 using your text editor? It should not indicate "UTF-8 w/o BOM", but UTF-8 only.

jdanielnd commented 9 years ago

Actually, I just tested the two types of UTF-8 and it should work fine with both of them.

martinstiago commented 9 years ago

Well, I tried to save the file on my text editor and upload it to the server, but I'm still getting the same error when I deploy the application... I also tryed to include the "#encoding: utf-8" on the beggining, and include some text on file's second field, just for testing... I really don't know why I'm having problems with this specific file...

joaofraga commented 9 years ago

Please read the following links.

https://ikiwiki.info/bugs/yaml_setup_file_does_not_support_UTF-8_if_XS_is_installed/ http://stackoverflow.com/questions/22612936/could-not-load-translations-invalid-trailing-utf-8-octet-in-yaml