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.




CC0
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):
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
UAV/UGV Autonomous Cooperation
Toward AI-embedded Society where AI is Not Recognized as AI
UNESCO: `Do you know AI or AI knows you better? Thinking Ethics of AI'
AI ELSI Award
Culture as the base of our country: Prof. Inose
AI support for Ethical AI Design
The University of Tokyo Academic Archives Portal - UTokyo Digital Collections
AI (Artificial Intelligence) and Philosophy
What an old AI researcher thinks after watching the movie "Green Book" - about Racism, Discrimination, and AI (Artificial Intelligence)
Difference between Science and Engineering
Koichi Hori Top page
Civilization, Culture, Science, and Technology
Koichi Hori
What is Artificial Intelligence?