Memorandum of Understanding to set Java's default encoding setting to UTF-8

After changing the text editor, the default setting changed from S-JIS to UTF-8. I thought that UTF-8 was (probably) the standard in the world, so it is a memorandum that I took this opportunity to investigate Java to match UTF-8.

Method

Set the character type you want to encode in the environment variable _JAVA_OPTIONS.

Example -Dfile.encoding=MS932 -Dfile.encoding=UTF-8

On Windows, this setting is possible with the set command.

Example set _JAVA_OPTIONS=-Dfile.encoding=MS932 set _JAVA_OPTIONS=-Dfile.encoding=UTF-8

However, this set command disappears when you restart, so if you want to set it semi-permanently, it seems better to set it manually in the environment variable.

Recommended Posts

Memorandum of Understanding to set Java's default encoding setting to UTF-8
Memorandum of understanding about LOD.
Memorandum of understanding when Spring Boot 1.5.10 → Spring Boot 2.0.0
WebMvcConfigurer Memorandum of Understanding for Spring Boot 2.0 (Spring 5)