Comments (4)
Since you appear to be using the CMD shell's start
command, you don't actually need to run "chcp.com"1. Just create a console window with a given session title, and configure console sessions with that title to use code page 65001. For example, the following creates a registry key for "QEMU" console sessions (like a profile) and sets 65001 as the "CodePage" to use:
> reg.exe add "HKCU\Console\QEMU" /v CodePage /t REG_DWORD /d 65001
The operation completed successfully.
Then use that session title in the start
command. For example:
> start "QEMU" qemu-system-x86_64.exe ... -nographic ... -hdd vmimage.qcow2
The title must be in quotes.
Footnotes
-
"chcp.com" is a console application that sets the console's input and output code pages to a given code page via
SetConsoleCP(codePageID)
andSetConsoleOutputCP(codePageID)
. This command, as well as "mode.com", were implemented in 1993 for the Windows NT console to emulate the builtinCHCP
andMODE
commands in the MS-DOS COMMAND.COM shell from back in the 1980s. However, the emulated commands a far cry from the original MS-DOS commands, which controlled not only device code pages but also synchronized the locale (e.g. names of days/months, format characters) and UI language (e.g. system messages and UI text) in the MS-DOS kernel.
The console code page on Windows NT systems has nothing to do with the locale or UI language in use by a console application. Windows applications can use the default user locale and UI language(s), the default system locale and UI language(s), or any ad hoc combination of locale and subset of the available UI languages. There's no setting in a console session for a preferred locale and UI language(s) to use for the session, in contrast to the "LANG", "LC_*", and "LANGUAGE" environment variables on POSIX. This is a serious deficiency.
Fortunately with UTF-8 support finally implemented in the console and the C runtime's locale implementation, at least locale data, system messages, and UI text can always be encoded when legacy applications write to console files, pipes, and disk files. The situation can be far worse if a legacy code page such as 1252 (Latin-1) gets paired with an incompatible locale or UI language. ↩
from terminal.
Does it work if you run chcp 65001
before running qemu?
Otherwise, can you run locale
(without arguments) and show us the output?
from terminal.
QEMU open default console by itself and route VM input/output to it. No option to interfere this process.
Only one thing came to my mind. What does chcp 65001
really do? If it emit special control sequence then I can try to force VM to emit this sequence at startup.
from terminal.
But...
As you notice there is a start
for QEMU to get VM in a new window not in a current terminal.
But I can achive this by starting another batch file which in turn will do chcp
and run QEMU:
replacing:
start qemu-system-x86_64.exe ... -nographic ... -hdd vmimage.qcow2
with
start runvm.bat
In runvm.bat
:
chcp 65001
qemu-system-x86_64.exe ... -nographic ... -hdd vmimage.qcow2
So problem still exist but QEMU has a working hack in my case.
from terminal.
Related Issues (20)
- All powershell versions dont work HOT 2
- Clicking on link in JSON object adds trailing double-quote HOT 5
- profiles.schema.json: NewTerminalArgs section is outdated
- Cursor disappears when AtlasEngine and Software Rendering are used together HOT 5
- TerminalPaneContent.cpp - TerminalPaneContent::TerminalPaneContent never knows the profile settings updated with the wt.exe cmdline arguments HOT 3
- Too little contrast in progress indicator of inactive tab in light theme HOT 2
- [Terminal Canary] The language setting doesn't match with the OS
- Argument doesn't work depending on their position
- Configuration for undercurl vertical offset HOT 16
- French accented letters showing up as Greek symbols HOT 4
- wt does not give terminal focus if batch scripting is running
- Cannot start wt through "Run" HOT 6
- Windows (probably conhost) sometimes gets stuck.
- conpty hangs in _ClosePseudoConsoleMembers
- Please add line numbers.
- Please add time stamps. HOT 1
- UI Concepts HOT 9
- Hyperlink/URL is not correctly recognized and opened HOT 2
- [Feature]Add option to always hide tab bar HOT 1
- Unable to build Windows Terminal in Powershell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal.