EncodingError: invalid byte sequence in US-ASCII
mergulhao opened this issue · comments
Hi @grodowski
I got the following problem when tried to use undercover... Any thought where should I start to fix this? 👇
Hi @mergulhao! Thanks for reporting this problem
This has been seen before and relates to the parser
gem not being able to parse certain strings. I attempted to fix this with #32, which was probably not enough to cover all cases.
This is a related parser
issue whitequark/parser#323
@mergulhao I've looked into this a bit today. I guess (from the shell prompt) that you're running undercover within docker. Is the system locale set to en_US.UTF8
?
export LC_ALL=C.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
@grodowski I didn't have time to look into this again. I'll try your suggestion and feedback to you probably until the end of this week.
@grodowski Your guess was correct... I'm running within docker. Those env vars was not set. After set those vars, it worked.
Thanks for leaving a reply @mergulhao. I'm closing this one
I was having the same issue in docker, in my case just export LC_ALL=C.UTF-8
fixed the issue. Thanks anyway
Worked for me @grodowski and @fabn (only needed LC_ALL
)- thank you!