Koichi Hori

Home About


Using unicode characters in Windows command line

(Diary of an Old AI Researcher who is still Programming)

30 March 2019

As I have written in "Using Python on Windows", I have recently begun to use a light Windows laptop instead of MacBook Air during my business trip.

Even during my business trip, I want to enjoy programming.
My MacBook Air has had enough development environment but my Windows laptop has only partial environment. So, I have decided to use the environment in my main machine in my office through VPN connection.
When I do this with the MacBook Air, I have no problem,
BUT, you know, with the Windows laptop, Oh là là !

Surprisingly, the default character code in Japanese Windows command line is still Shift-JIS !

I have searched in the internet and have found that I can change the character code setting in Windows command line by the command `CHCP'.

chcp 65001
will change the character code to UTF-8.
(To return to Shift-JIS, chcp 932.)

Moreover, I have found that I should set the bash environment variable `LANG' on the remote machine to `ja_JP.UTF-8'.

Well, any way, these settings seem to work.

To the extent possible under law, the person who associated CC0 with this work has waived all copyright and related or neighboring rights to this work.

Related entries (automatically calculated):
Login window freezes when making VNC connection from Windows to Mac
css <pre> and <code> for mobile devices
Using Python on Windows
Redirecting URL in Ruby on Rails
Showing the favicon in Google search results
Unicode decode error "'utf-8' codec can't decode byte 0xfa in position 0: invalid start byte" when using MeCab
Aligning Facebook button and Twitter button
On This Day: Atomic Bomb Dropped on Nagasaki
UAV/UGV Autonomous Cooperation
UNESCO: `Do you know AI or AI knows you better? Thinking Ethics of AI'
Mechanical engineers and electrical engineers have different mental models of oscillation
Toward AI-embedded Society where AI is Not Recognized as AI
Koichi Hori: Last Lecture
What an old AI researcher thinks after watching the movie "Green Book" - about Racism, Discrimination, and AI (Artificial Intelligence)
AI support for Ethical AI Design
Culture as the base of our country: Prof. Inose
AI (Artificial Intelligence) and Philosophy
A small program which extracts rhythmic word sequences such as Tanka(57577) or Haiku(575) from a plain text
The University of Tokyo Academic Archives Portal - UTokyo Digital Collections
Difference between Science and Engineering
Civilization, Culture, Science, and Technology
Koichi Hori Top page
What is Artificial Intelligence?
Koichi Hori