Bug #88157 --defaults-file option passing Unicode characters on Windows fails
Submitted: 19 Oct 2017 22:48 Modified: 20 Oct 2017 7:08
Reporter: Javier Treviño Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.19 OS:Microsoft Windows (Windows 10)
Assigned to: CPU Architecture:Any

[19 Oct 2017 22:48] Javier Treviño
Description:
Using the --defaults-file option on mysql.exe to connect to a server, and passing within the path Unicode characters causes a fatal error

How to repeat:
Make sure you have a config file in a folder containing Unicode characters.

Running something like:
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" --defaults-file="C:\Users\Javier Treviño\MySQL\mysql-sandboxes\3310\my.cnf" "-uroot" "-p"

will throw the following:
mysql: [ERROR] Could not open required defaults file: C:\Users\Javier Trevi├▒o\MySQL\mysql-sandboxes\3310\my.cnf
mysql: [ERROR] Fatal error in defaults handling. Program aborted!

In this case the "ñ" character is being read wrongly by the mysql.exe

Suggested fix:
A workaround (maybe not suitable for everyone) is using DOS naming convention.
For me using the following works:
C:\Users\Javier Treviño>"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe" --defaults-file="C:\Users\Javier~1\MySQL\mysql-sandboxes\3310\my.cnf" "-uroot" "-p"

But the real fix is checking why Unicode characters are not interpreted correctly.
[20 Oct 2017 7:08] Umesh Shastry
Hello Javier,

Thank you for the report!

Thanks,
Umesh