FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Default file encodings

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
Charles Oliver Nutter
Posted via mailing list.





PostPosted: Mon Feb 16, 2009 6:56 pm    Post subject: Default file encodings Reply with quote

This is on OS X, NB 6.5, fairly recent updates.

I'm struggling with some JRuby issues regarding default file encoding
for .rb files. It seems that .rb files created in a Ruby project do
indeed save as UTF-8. But .rb files created in other projects, like a
Java project, do not; they save as what `file` calls "Non-ISO
extended-ASCII English text"

Is this a known issue? We're trying to improve how JRuby handles various
file encodings throughout Ruby and when calling Java and native APIs,
and this difference between in-project and out-of-project is causing no
end of grief.

- Charlie
Back to top
Yoko Harada
Posted via mailing list.





PostPosted: Mon Feb 16, 2009 7:38 pm    Post subject: Default file encodings Reply with quote

Hi Charles,

Did you check the project encoding on NetBeans? If you open "Project
Properties" window, you can see what encoding is selected for that
project at the bottom of the Sources category. Both Java and Maven
project has this option in the Sources category. I don't have any
problem on OS X, NB 6.5. I can save .rb file by the specified encoding
in Java and Maven project.

-Yoko

On Mon, Feb 16, 2009 at 1:56 PM, Charles Oliver Nutter
<address-removed> wrote:
Quote:
This is on OS X, NB 6.5, fairly recent updates.

I'm struggling with some JRuby issues regarding default file encoding for
.rb files. It seems that .rb files created in a Ruby project do indeed save
as UTF-8. But .rb files created in other projects, like a Java project, do
not; they save as what `file` calls "Non-ISO extended-ASCII English text"

Is this a known issue? We're trying to improve how JRuby handles various
file encodings throughout Ruby and when calling Java and native APIs, and
this difference between in-project and out-of-project is causing no end of
grief.

- Charlie






Back to top
Charles Oliver Nutter
Posted via mailing list.





PostPosted: Tue Feb 17, 2009 10:19 am    Post subject: Default file encodings Reply with quote

Yoko Harada wrote:
Quote:
Hi Charles,

Did you check the project encoding on NetBeans? If you open "Project
Properties" window, you can see what encoding is selected for that
project at the bottom of the Sources category. Both Java and Maven
project has this option in the Sources category. I don't have any
problem on OS X, NB 6.5. I can save .rb file by the specified encoding
in Java and Maven project.

Genius! I don't know why I didn't think to check the JRuby project
settings, but you nailed it: it was set to "no encoding". Thanks for the
help!

- Charlie
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB