确切来说不是mysql的问题,只是我在使用xampp中的Mysql(实际上是mariadb)时,碰到了这个问题。
如上,无法识别中文路径。那四个打问号的字符本应该是“必知必会”。
为什么?
如下,可能和cmd中的编码有关系。
image.png
https://en.wikipedia.org/wiki/Code_page_437
wikipedia中解释了
Code page 437 is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437,[1] PC-8,[2] or DOS Latin US.[3] The set includes ASCII codes 32–126, extended codes for accented letters (diacritics), some Greek letters, icons, and line-drawing symbols. It is sometimes referred to as the "OEM font" or "high ASCII", or as "extended ASCII"[2] (one of many mutually incompatible ASCII extensions).
我需要将这里改成utf-8。cmd才能识别输入的中文。
请参考:https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8
网友评论