0

Mysql Turkish Characters problem

Im using xampp mysql server for server. But im trying to use it from the terminal/cmd. When i query smth with turkish letters like "oğuz" , it returns "?" instead of "ğ" letter ex:"o?uz"

"xampp mysql cSet options" default-character-set=utf8mb4 character-set-server=utf8mb4 collation-server=utf8mb4_general_ci

Are these c-sets wrong?

update: I did try utf8mb4_turkish_ci and utf8mb4_tr_0900_ai_ci Hex returned empty

Solution : Reinstalled the xampp (Some things was broken maybe) and it worked

Kanot
  • 9
  • 3
  • See "question marks" (not "black diamond") in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored And see the `SELECT HEX(col)` top for debugging. Also, you may prefer Collation `utf8mb4_tr_0900_ai_ci` or `utf8mb4_turkish_ci` . `utf8mb4_general_ci` is quite lame. – Rick James May 19 '23 at 17:34
  • Thanks for help but it returns "-" now , like "o-uz" :( – Kanot May 19 '23 at 19:30
  • 1
    Please update your question with new information rather than posting it as a comment. – skomisa May 19 '23 at 19:32
  • What steps did you take to get to `"-"`? – Rick James May 19 '23 at 23:04
  • It's not `-` (U+002D, *Hyphen-Minus*) but `­` (U+00AD, *Soft Hyphen*) by the following [mojibake](https://en.wikipedia.org/wiki/Mojibake) case (*example in Python for its universal intelligibility*): `"oğuz".encode( 'cp1254').decode( 'cp857')` returns `'o\xaduz'` (some font renders *Soft Hyphen* as _minus_). Windows? Change code page `chcp 1254`, see https://ss64.com/nt/chcp.html (The same example: `print( "oğuz".encode( 'cp1254').decode( 'cp857'))` -> `o­uz`). – JosefZ May 20 '23 at 09:42
  • aight guys Thanks y'all for the answers. i just reinstalled the xampp and it worked.i dunno why but if it is working dont touch it u know :> – Kanot May 20 '23 at 19:08

0 Answers0