You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Vladimir Machat <ma...@gmail.com> on 2022/01/23 10:27:44 UTC

UTF-8 characters + Maven project + Windows = not working

Hi all,

Trying to print out special Czech characters on Windows:

System.out.prinltn("ěščřžýáé");

results only in just a bunch of question marks in the output window.

I am pretty sure, that some time ago, when I wrote here about problems 
with input in Maven project (which was promptly resolved by Michal Bien 
in PR #3289) it worked fine.

It also works perfectly fine on Linux, or using Ant project. It's just 
the Maven project on Windows.

I tried adding -J-Dfile.encoding=UTF-8 to netbeans.conf - nothing changed.

I also tried to play with the file encodings settings, but changing it 
to cp1250 didn't help.

And I also tried different versions of Netbeans (12.5, 12.6, 13RC) and 
Maven (3.6.3 and 3.8.4) all the same. Which is weird, because as I said, 
I believe that it worked not long ago.

Changing fonts in Netbeans didn't help too.

Any ideas?


Thanks

Vlad

Re: UTF-8 characters + Maven project + Windows = not working

Posted by Mar R <ma...@gmail.com>.
Of "ěščřžýáé" it didn't print correctly only "ěšč" but it did after *"SET
MAVEN_OPTS=-Dfile.encoding=utf-8"*
*https://stackoverflow.com/questions/3017695/how-to-configure-encoding-in-maven#comment118645046_3018152
<https://stackoverflow.com/questions/3017695/how-to-configure-encoding-in-maven#comment118645046_3018152>*
first answerm 4th comment

Il giorno dom 23 gen 2022 alle ore 11:27 Vladimir Machat <ma...@gmail.com>
ha scritto:

> Hi all,
>
> Trying to print out special Czech characters on Windows:
>
> System.out.prinltn("ěščřžýáé");
>
> results only in just a bunch of question marks in the output window.
>
> I am pretty sure, that some time ago, when I wrote here about problems
> with input in Maven project (which was promptly resolved by Michal Bien
> in PR #3289) it worked fine.
>
> It also works perfectly fine on Linux, or using Ant project. It's just
> the Maven project on Windows.
>
> I tried adding -J-Dfile.encoding=UTF-8 to netbeans.conf - nothing changed.
>
> I also tried to play with the file encodings settings, but changing it
> to cp1250 didn't help.
>
> And I also tried different versions of Netbeans (12.5, 12.6, 13RC) and
> Maven (3.6.3 and 3.8.4) all the same. Which is weird, because as I said,
> I believe that it worked not long ago.
>
> Changing fonts in Netbeans didn't help too.
>
> Any ideas?
>
>
> Thanks
>
> Vlad
>

Re: UTF-8 characters + Maven project + Windows = not working

Posted by Vladimir Machat <ma...@gmail.com>.
Thanks Helmut,

but that doesn't apply to the problem I am writing about. They are 
talking there about general command line input. I am talking about the 
Maven project output window in Netbeans, which is broken.

But since you brought it up - if I do change the codepage of windows cmd 
using 'chcp 65001' and run the example code using maven, I get correct 
output.

But I am trying to find how to that in Netbeans...

Vlad


On 23/01/2022 12:06, Helmut Leininger wrote:
> Maybe have a look athttps://stackoverflow.com/questions/49016189/windows-10-cli-utf-8-encoding
>
> Mit freundlichen Grüßen
> Helmut Leininger
>
> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
>
> Am 23. Jänner 2022 11:27:44 MEZ schrieb Vladimir Machat<ma...@gmail.com>:
>> Hi all,
>>
>> Trying to print out special Czech characters on Windows:
>>
>> System.out.prinltn("ěščřžýáé");
>>
>> results only in just a bunch of question marks in the output window.
>>
>> I am pretty sure, that some time ago, when I wrote here about problems with input in Maven project (which was promptly resolved by Michal Bien in PR #3289) it worked fine.
>>
>> It also works perfectly fine on Linux, or using Ant project. It's just the Maven project on Windows.
>>
>> I tried adding -J-Dfile.encoding=UTF-8 to netbeans.conf - nothing changed.
>>
>> I also tried to play with the file encodings settings, but changing it to cp1250 didn't help.
>>
>> And I also tried different versions of Netbeans (12.5, 12.6, 13RC) and Maven (3.6.3 and 3.8.4) all the same. Which is weird, because as I said, I believe that it worked not long ago.
>>
>> Changing fonts in Netbeans didn't help too.
>>
>> Any ideas?
>>
>>
>> Thanks
>>
>> Vlad

Re: UTF-8 characters + Maven project + Windows = not working

Posted by Helmut Leininger <h....@gmx.at>.
Maybe have a look at https://stackoverflow.com/questions/49016189/windows-10-cli-utf-8-encoding

Mit freundlichen Grüßen 
Helmut Leininger 

Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Am 23. Jänner 2022 11:27:44 MEZ schrieb Vladimir Machat <ma...@gmail.com>:
>Hi all,
>
>Trying to print out special Czech characters on Windows:
>
>System.out.prinltn("ěščřžýáé");
>
>results only in just a bunch of question marks in the output window.
>
>I am pretty sure, that some time ago, when I wrote here about problems with input in Maven project (which was promptly resolved by Michal Bien in PR #3289) it worked fine.
>
>It also works perfectly fine on Linux, or using Ant project. It's just the Maven project on Windows.
>
>I tried adding -J-Dfile.encoding=UTF-8 to netbeans.conf - nothing changed.
>
>I also tried to play with the file encodings settings, but changing it to cp1250 didn't help.
>
>And I also tried different versions of Netbeans (12.5, 12.6, 13RC) and Maven (3.6.3 and 3.8.4) all the same. Which is weird, because as I said, I believe that it worked not long ago.
>
>Changing fonts in Netbeans didn't help too.
>
>Any ideas?
>
>
>Thanks
>
>Vlad