I have been having some problems with the character set in windows and mariadb, I discovered that my windows terminal uses cp850 and when I insert the character 'ñ' in mariadb on windows terminal it saves the character '\xA2' instead of the utf8 \x{C3B1}.
Other details
OS | Program | Terminal | Shell |
---|---|---|---|
Windows 11 Home x86_64 | MariaDB through XAMPP | Windows Terminal | Command Prompt |
After some investigation I found that to use the full system on UTF8 I need to change the region settings to enable the 'Beta: UTF8..' option but that bring other problem. When I enter the query:
SELECT 'ñ';
mariadb shows the "'>" prompt, so I need to close an unopened quotation mark and put again the semicolon, and when that is done and I press enter mariadb doesn't show anything but only a new line inside the table. (this behavior is the same with 'áéíóú' characters)
I was expecting that the query SELECT 'ñ'
shows the 'ñ' as is, and I want to use utf8 on mariadb shell (So I need that SELECT HEX('ñ')
returns 'C3B1') I really searched for a solution but I cant find anything so how can I do that?
And sorry for my bad english.
PS: I've also tried to force the client collation to utf8mb4 but also it doesn't work, it keeps me showing the '> prompt when I type the first query on this question.