当前位置:网站首页>编译文件时报错:错误: 编码GBK的不可映射字符
编译文件时报错:错误: 编码GBK的不可映射字符
2022-07-03 03:29:00 【南风~古草】
1、遇到的问题:窗口cmd编译文件报错:编码GBK的不可映射字符:

2、原因分析:
Windows下默认为GBK编码,javac编译utf-8编码的java文件时,会报错: 编码GBK的不可映射字符
3、解决方法:
在javac后面加上-encoding utf-8
即:

4、引申:
Linux下默认为UTF-8编码,javac编译gbk编码的java文件时,会报错: 编码UTF8的不可映射字符
在javac 后添上-encoding gbk
边栏推荐
猜你喜欢
![C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 05 data input and output](/img/38/9c460fc58b62609dd02e7c61207ae6.jpg)
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 05 data input and output
![C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions](/img/4a/1df03d9f3315debb4c335260ed39f2.jpg)
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions

Idea set method call ignore case

Vs Code configure virtual environment

MySQL MAC download and installation tutorial

Applet get user avatar and nickname

FileZilla Client下载安装

Mongodb installation & Deployment

VS 2019 配置tensorRT生成engine

Docker install and start MySQL service
随机推荐
Mongodb replication set [master-slave replication]
The idea setting code is in UTF-8 idea Properties configuration file Chinese garbled
Réglez la hauteur et lancez le système. Currenttimemillis catton
Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences
监听对象中值变化及访问
[set theory] partial order relation (partial order relation definition | partial order set definition | greater than or equal to relation | less than or equal to relation | integer division relation |
[combinatorics] basic counting principle (addition principle | multiplication principle)
Bigvision code
Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence
The difference between static web pages and dynamic web pages & the difference between Web1.0 and Web2.0 & the difference between get and post
Bid farewell to artificial mental retardation: Mengzi open source project team received RMB 100 million financing to help NLP develop
Summary of electromagnetic spectrum
解决高並發下System.currentTimeMillis卡頓
[MySQL] the difference between left join, right join and join
Mongodb master profile
User value is the last word in the competition of mobile phone market
[mathematical logic] propositions and connectives (propositions | propositional symbolization | truth connectives | no | conjunction | disjunction | non truth connectives | implication | equivalence)
PAT乙级常用函数用法总结
简易版 微信小程序开发之for指令、上传图片及展示效果优化
C # webrequest post mode, based on "basic auth" password authentication mode, uploads files and submits other data using multipart / form data mode