[ 
https://issues.apache.org/jira/browse/NETBEANS-6115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Bien closed NETBEANS-6115.
----------------------------------
    Fix Version/s: 12.6
       Resolution: Fixed

i believe this was fixed in 12.6 via the linked PR as far as i remember.

> UTF-8 input is broken in Maven project
> --------------------------------------
>
>                 Key: NETBEANS-6115
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-6115
>             Project: NetBeans
>          Issue Type: Bug
>          Components: apisupport - Maven
>    Affects Versions: 12.3, 12.4, 12.5
>         Environment: Linux Manjaro
> Netbeans 12.5 (but the same problem is in earlier versions too)
> Maven 3.8.2
> Java - tried with 8,14,17 
>  
>            Reporter: Vladimir Machat
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 12.6
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Trying to get user input containing 'special characters' like ščřžýáíé 
> doesn't work in Maven project:
>  
> {code:java}
> Scanner sc = new Scanner(System.in, "UTF-8");
> System.out.println("Enter text: ");
> String text = sc.nextLine();
> System.out.println("You have entered: " + text);
>  
> {code}
>  
>  
> In Netbeans this code will fail printing what you entered if you enter 
> something like 'český, řeka etc...' but works ok with any input not 
> containing these characters
> Same code works in an Ant project without any problems.
> It also works on command line by copying and pasting the command from 
> Netbeans output window (and replacing the double quotes with single quotes). 
> Example:
> {code:java}
> cd /home/atrament/Nextcloud/Projects/java/InputTestMaven; 
> JAVA_HOME=/opt/java/jdk-14.0.1+7-hotspot M2_HOME=/opt/maven 
> /opt/maven/bin/mvn -Dexec.vmArgs= "-Dexec.args=${exec.vmArgs} -classpath 
> %classpath ${exec.mainClass} ${exec.appArgs}" -Dexec.appArgs= 
> -Dexec.mainClass=net.atramentovo.inputtestmaven.Main 
> -Dexec.executable=/opt/java/jdk-14.0.1+7-hotspot/bin/java 
> -Dfile.encoding=UTF-8 org.codehaus.mojo:exec-maven-plugin:3.0.0:exec
> Running NetBeans Compile On Save execution. Phase execution is skipped and 
> output directories of dependency projects (with Compile on Save turned on) 
> will be used instead of their jar artifacts.
> Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
> Scanning for projects...-------------------< net.atramentovo:InputTestMaven 
> >-------------------
> Building InputTestMaven 0.1
> --------------------------------[ jar ]------------------------------------ 
> exec-maven-plugin:3.0.0:exec (default-cli) @ InputTestMaven ---
> Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
> Enter text: 
> Řeka šuměla skalnatým údolím
> You have entered: Xeka aumla skalnat�m �dol�m
> ------------------------------------------------------------------------
> BUILD SUCCESS
> ------------------------------------------------------------------------
> Total time:  2.682 s
> Finished at: 2021-10-10T19:55:24+01:00
> ------------------------------------------------------------------------
> {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to