Skip to content

Add encoding: utf-8 to fix error while importing#6

Open
Daan- wants to merge 1 commit intomoll:masterfrom
Daan-:patch-1
Open

Add encoding: utf-8 to fix error while importing#6
Daan- wants to merge 1 commit intomoll:masterfrom
Daan-:patch-1

Conversation

@Daan-
Copy link

@Daan- Daan- commented Apr 7, 2014

Error: invalid multibyte char (US-ASCII)

Error: invalid multibyte char (US-ASCII)
@moll
Copy link
Owner

moll commented Apr 7, 2014

Hey, thanks for sharing your caring! I believe you could also set the RUBYOPT env variable to -Ku which might be a more universal solution. :)

Let me know if that works!

@Daan-
Copy link
Author

Daan- commented Apr 7, 2014

That will probably work, but this seems a bit more universal. I would rather not have to set the RUBYOPT environment on every production server specifically for this gem..

@moll
Copy link
Owner

moll commented Apr 7, 2014

Hmm, how does the whole Ruby eco work around this without polluting every file with explicit encoding comments? I've so far always set RUBYOPT in shell rcs and in Upstart init scripts that start Ruby because of not defaulting to UTF-8 seems more like a bug than a feature of Ruby. That was strictly a v1.9 "bug", right? I guess it's triggered from my last name's "ö" character in this particular case.

@Daan-
Copy link
Author

Daan- commented Apr 15, 2014

Yes it's triggered by the "ö". Ruby 2.1 (which is installed on the server) should not have this bug, but strangely I still get the error. Luckily, only this file triggers the error, so this single line should fix it for everyone. I have no clue on how other Ruby projects handle this, generally it seems not to be a problem, as there are very little files which have special characters. However I recall seeing the same line in Rails localization files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants