But the TXT file path and name may be in Chinese,
For example, I need to execute the following SQL statement:
Select the load_file (' E: \ \ gold. Obj);
Mysql can see the result is NULL, as shown in figure:
However, when I do the following this statement
Select the load_file (' E: \ \ 12. Obj);
The result is shown in figure:
Right-click the BLOB can see 12. The content in the obj
12. According to the inside of the obj is normal
Gold. Obj and 12. Obj is the same file, just name was changed my
For bosses to help have a look at the the load_file () how to support Chinese path?
Explain my environment configuration:
I am win10 system
MYSQL version is 5.7
Perform the show variables like '% % character; The results are as follows:
CHCP command in the CMD,
C: \ Users \ ZXC> CHCP
The active code page: 936
GBK code of the system is
I tried in the MYSQL:
The set names' GBK ';
And
The set names' gb2312 ';
The results are in the same way as initially said
Really don't know what to do,
Also don't know if the load_file () does not support Chinese path
Various bosses please!!!!!!
Thank you very much!!!!!!
CodePudding user response:
The set names' GBK ';CodePudding user response:
Don't recommend the use of Chinese path nameSELECT the LOAD_FILE (CONCAT (' D:/'UNHEX (' D6D0'), '. TXT "));
D6D0 is GBK Chinese characters "in" code
CodePudding user response:
Don't recommend the use of Chinese path nameSELECT the LOAD_FILE (CONCAT (' E:/'UNHEX (' D6D0'), 'obj'));
BDF0 is Chinese characters "gold" GBK code
Just stick my test cases go up directly, without modified
[code=SQL] [/code]
CodePudding user response: