Re: NetBean charset problem

  • From: Jussi Hirvi < >
  • To:
  • Subject: Re: NetBean charset problem
  • Date: Fri, 20 Jan 2012 10:59:29 +0200

First, you are right in that it's a problem of output, not input or storage. I checked the file encoding with vim, and the file encoding follows the NetBean project setting correctly.

I tried to set LANG and LC_ALL in /etc/profile (and logged out/in to be sure the change is in effect), but the error is still there.

However, now I found a good lead:

The problem seems to be connected to the OS's JDK, which uses MacRoman as default encoding!

There is supposed to be a fix for this in Jruby 1.4, but when I test in NetBean using Jruby 1.5, the problem (in output panel) still persists.

Maybe this could be fixed by adding a JDK argument in NB project settings?

I tried adding the line
        # coding: utf-8
to top of my main.rb - but no effect. Still no solution.

- Jussi

On 19.1.2012 18.00, Thomas E Enebo wrote:
There is a way of changing options for starting up NetBeans (cannot
remember which file or where especially on MacOS).  I am wondering
what happens if you set LC_ALL=en_US.UTF-8 as an env in the startup

My guess would be that editing window is honoring project settings but
output windows is using the default charset.


On Thu, Jan 19, 2012 at 9:34 AM, Jussi 
Hirvi< >
>  Hello list,
>  I just installed NetBeans, and I am totally newbie with Ruby too.
>  The problem is that when I create a new NetBeans project and write
>          puts "ä"
>  ...and then run the file, I get
>          ‰
>  ... in the output window, instead of my special char.
>  This is after I changed the project encoding (File ->  Project properties) 
>  iso-8859-1. If I set the project encoding back to utf-8 (= program default)
>  and repeat the test, the output is
>          √§
>  Info from "About NetBeans" window:
>>  Product Version: NetBeans IDE 6.9.1 (Build 201007282301)
>>  Java: 1.6.0_29; Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402
>>  System: Mac OS X version 10.6.8 running on x86_64; MacRoman; en_US (nb)
>>  Userdir:/Users/jussihirvi/.netbeans/6.9
>  I notice it says "MacRoman", I don't know if that's relevant.
>  I am using the OS installation of ruby: 1.8.7
>  - Jussi

NetBean charset problem

Jussi Hirvi 01/19/2012

Re: NetBean charset problem

Thomas E Enebo 01/19/2012

Re: NetBean charset problem

Jussi Hirvi 01/20/2012

Re: NetBean charset problem

Jussi Hirvi 01/21/2012

Project Features

About this Project

Ruby was started in November 2009, is owned by Petr Jiricka, and has 71 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm