RM doesn't detect non-utf encodings, and won't let me change away from utf8.
In my current project I need to work with a mix of utf8, utf16le, Shift_JIS and US-ASCII files.
However, the Shift_JIS and US-ASCII files gets detected as utf8 files, which in combination with autosave can have some problematic side effects (specs failing mysteriously etc.).
Note, UTF16LE is correctly detected.
Also, I am unable to set the encoding to anything but utf8. That is, the encoding-related items in the right click menu, in the file menu and in the gutter menu are all set to utf8 and greyed out.
Am I missing something in my setup or is this a bug?
Environment:
Ubuntu Linux 12.04 amd64
Oracle JDK 1.6~
请先登录再写评论。
Hi there,
1. Settings | File Encodings --> uncheck Autodetect UTF-encoded files
2. Restart IDE (required, othewise it will not have any effect)
Now you can set any encoding manually.
Hi, thanks for taking your time to respond.
![Screenshot from 2012-07-10 10:12:41.png]()
I don't have a "File encodings" item in my settings.
Hmm the screeenshot doesn't seem to show up in my post. I hope you can view it.
Also, I would prefer RM to correctly detect the file encodings, is that not possible? Having to set encodings for all files would be a bit of a hazzle.
Not to mention, it makes emacs colleagues go "tsk tsk" :) which depresses a RM fan like me.
Regards,
Hi,
Hmm -- such option is present in IntelliJ IDEA as well as Php/WebStrom, so I assumed it will be there in RubyMine as well. My apologies for false suggestion.
In any case -- here is what official online help suggests for such case: http://www.jetbrains.com/ruby/webhelp/configuring-individual-file-encoding.html
If that does not help .. then unfortunately I do not know (I have not used actual RubyMine before). I have tried installing it and created simple project/files ... and it allows me to change encoding via status bar. The way I've originally described is the way how I used to override it in such "cannot-change-encoding" situations when using PhpStorm.
P.S.
No, I'm unable to see the picture as well -- must be because of file name of something (built-in "make and attach screenshot" tool of this forum rarely work well in my experience).
No apogies necessary :).
I looked at the online help pages that you suggested (earlier), but I couldn't change encoding according to them. Did you try this in RM or in Phpstorm? If you tried in RM, could you let me know what version?
Regards,
RubyMine v4.0.3 Windows -- http://www.jetbrains.com/ruby/download/index.html
P.S.
Hopefully RubyMine responsible dev will see this thread and answer it shortly. If not -- you can always contact support department -- support@jetbrains.com
Thanks for the information
As for me, I am on RM 4.5 beta on linux, so perhaps something is not working in my environment. The fact that the encoding selector in the gutter menu greys out once I click it does seem a bit wierd. Gonna try opening a new project and see what happens.
Is "File | Reload..." behaving the same?
File > Reopen is greyed out.
I've opened a ticket at http://youtrack.jetbrains.com/issue/RUBY-11556.
Regards.