Your problem is most likely your operating system's default file encoding
here (perhaps MacRoman?).  The IDE is assuming that process output is
whatever your operating system's default encoding is, which is the right
assumption, since that *is* what command-line utilities will output.  It
happens that the process you're running is outputting UTF-8 *rather than* the
OS's default encoding.

Setting that as a default would be assuming that every operating system
uses UTF-8 regardless of what it does - it would be wrong a lot of the
time.  It just happens to solve the case that whatever you're running is
outputting UTF-8 in spite of what the operating system provides.

That's not that uncommon, but the right solution is to *detect* that the
output is UTF-8 when the IDE runs whatever it is you're running.

So... what are you running?  Is this project output?  If so, what kind of
project?  Or server output of some kind?  A correct fix would be to (if
possible), detect what that is and that it will output UTF-8, and have the
IDE open the output of that process with the right encoding.

-Tim

On Fri, Apr 20, 2018 at 6:18 PM, Victor Williams Stafusa da Silva <
[email protected]> wrote:

> I frequently had some long-standing problems with the console output
> encoding in Netbeans. Which always presented garbled non-ascii characters
> for me.
>
> After deciding that it was enough, I went to search for a solution and did
> found a very simple one in StackOverflow. Just add -J-Dfile.encoding=UTF-8
> into the netbeans_default_options line of netbeans.conf file and voilĂ , it
> works!
>
> However, this make me think about it:
>
> 1. Is there a reason to not add it there by default?
>
> 2. If it can't be added there by default for some reason, can it at least
> be something more user-friendly and less arcane to be configured by the
> normal user?
>
> Victor Williams Stafusa da Silva
>



-- 
http://timboudreau.com

Reply via email to