Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Conversation

@ananevam
Copy link
Contributor

linter-ruby throws error for non-ascii characters. add command-line arguments to set utf-8 encoding

@binary1101
Copy link

+1, solved my problem with unexpected end of input. Example file:

class HomeController < ApplicationController
  def index
    name = 'Aleksandr'
    @hello = "Привет, #{name}"
  end
end

@Arcanemagus
Copy link
Member

Looks like this probably will fix #69 as well, @kepler0 any comments before merging?

@keplersj
Copy link
Contributor

👍

Arcanemagus added a commit that referenced this pull request Feb 22, 2016
@Arcanemagus Arcanemagus merged commit 3047652 into AtomLinter:master Feb 22, 2016
@keplersj
Copy link
Contributor

I would've merged this in sooner, but I'm waiting on Travis Deploy to be merged in for PRs like this. Just because publishing from the command line in the middle of the school day gets tedious.

@Arcanemagus
Copy link
Member

Ah, well I've published this in v1.2.2 manually for now till the magic deployment from CI is done 😀.

@keplersj
Copy link
Contributor

😀

@Arcanemagus
Copy link
Member

I think this should actually be reverted. The -Ku parameter is only for Ruby v1.8, which hasn't been supported for almost 3 years. Ruby v1.9 supports the "magic encoding comment" of # encoding: utf-8 (according to this), and 2.0 and above default to UTF-8.

The reason this should be removed is that current versions of Ruby are printing a warning that this can cause odd behavior and should be avoided:
image

Thoughts on this @ananevam, @binary1101, and @kepler0?

@ananevam
Copy link
Contributor Author

ananevam commented Mar 9, 2016

I will fix it. wait PR

@ananevam ananevam deleted the set_utf8_encoding branch March 9, 2016 20:06
@Arcanemagus
Copy link
Member

Oh, I can fix it, I just wanted your thoughts on it since you had initially written this so you must have had a reason for it 😛.

@ananevam
Copy link
Contributor Author

ananevam commented Mar 9, 2016

man ruby
no info about -Ku parameter is only for Ruby v1.8

@ananevam
Copy link
Contributor Author

ananevam commented Mar 9, 2016

#78

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants