You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the launch.json file for the project is changed to have the console property set to integratedTerminal for the launch configuration, any Unicode characters printed to said terminal with will be replaced with plain-text question marks. This is happening because the VSCode Terminal being started is using the default Windows code page of 65000, which is ASCII, not 65001 which is UTF-8.
Environment
Operating System: Windows 10 1809 Build 17763.253
JDK version: 10.0.2
Visual Studio Code version: 1.30.2
Java extension version: 0.5.0
Java Debugger extension version: 1.16.0
Steps To Reproduce
Use command window (F1 key by default) to select Java: Create Java Project; use it to create a new project called JavaDebugConsoleIssue.
Inside the main method generated in the App.java file of the app package, paste the following line.
System.out.println("\u26a1\u2661");
Change the launch.json file within the .vscode folder to include a setting in the launch configuration like so: "console": "integratedTerminal".
Run the project, and see that the symbols actually printed to the console are simply question marks in the place of where the characters are supposed to be.
Java Debug Console Issue Reproduction.zip
I don't think logs for this issue will really be helpful, because the problem is with something that is not done, not with something that is not working.
Current Result
PS C:\Users\alexf\Documents\Visual Studio Code\Workspaces\Java Debug Console Issue> cd 'c:\Users\alexf\Documents\Visual Studio Code\Workspaces\Java Debug Console Issue'; & 'C:\Program Files\Java\jdk-10.0.2\bin\java' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:62607' '-Dfile.encoding=UTF-8' '-cp' 'C:\Users\alexf\AppData\Roaming\Code\User\workspaceStorage\881c58722dff86f4979c37a374ece66d\redhat.java\jdt_ws\jdt.ls-java-project\bin' 'app.App'
??
Expected Result
⚡♡
Additional Information
Every other type of Terminal, including the integrated PowerShell Terminal that can be launched through the VSCode menus supports running equivalent code to generate proper Unicode character output. I cannot use the VSCode Debug Console, as it does not support input streams, which my project requires. Also, running the command chcp 65001 in the terminal after a run of the program will cause subsequent runs to display the proper characters.
The text was updated successfully, but these errors were encountered:
The resolution to this would be to change the launch script to run the command chcp 65001 and then cls. I have not yet found a way to make this possible.
I also have this issue. I've set terminal to start in code page 65001, but debugs session is started in Debug Console so Unicode strings are displayed as broken word.
If the
launch.json
file for the project is changed to have theconsole
property set tointegratedTerminal
for the launch configuration, any Unicode characters printed to said terminal with will be replaced with plain-text question marks. This is happening because the VSCodeTerminal
being started is using the default Windows code page of65000
, which isASCII
, not65001
which isUTF-8
.Environment
Steps To Reproduce
Java: Create Java Project
; use it to create a new project calledJavaDebugConsoleIssue
.main
method generated in theApp.java
file of theapp
package, paste the following line.launch.json
file within the.vscode
folder to include a setting in the launch configuration like so:"console": "integratedTerminal"
.Java Debug Console Issue Reproduction.zip
I don't think logs for this issue will really be helpful, because the problem is with something that is not done, not with something that is not working.
Current Result
Expected Result
⚡♡
Additional Information
Every other type of
Terminal
, including the integratedPowerShell Terminal
that can be launched through the VSCode menus supports running equivalent code to generate proper Unicode character output. I cannot use the VSCodeDebug Console
, as it does not support input streams, which my project requires. Also, running the commandchcp 65001
in the terminal after a run of the program will cause subsequent runs to display the proper characters.The text was updated successfully, but these errors were encountered: