locked
Entityframework Turkish charset "contains" problem RRS feed

  • Question

  • User283528319 posted

    Hi all,

    in Turkish we use İ as big <g class="gr_ gr_55 gr-alert gr_tiny gr_spell gr_inline_cards gr_run_anim ContextualSpelling multiReplace" id="55" data-gr-id="55">i</g> and we also have another letter which is " ı " (which is not i ) and this cause problem for EF to find the record with contains.

    for example, it couldn't find "Bozyazı"

    ps the database is MySQL

    Friday, February 8, 2019 10:19 PM

All replies

  • User475983607 posted

    Set the collation and characters set(s)in your MySQL DB.  The MySQL reference documentation covers the details.

    https://dev.mysql.com/doc/refman/8.0/en/charset-mysql.html

    Friday, February 8, 2019 11:21 PM
  • User283528319 posted

    latin5 didn't solve my problem

    myConnection": "server=localhost;port=3306;database=mydb;user=root;password=xxx;Charset=latin5"

    Saturday, February 9, 2019 12:00 AM
  • User475983607 posted

    latin5 didn't solve my problem

    myConnection": "server=localhost;port=3306;database=mydb;user=root;password=xxx;Charset=latin5"

    Did you set the collation as suggested above?  Have you tried INSERTing a record directly in MySQL to verify MySQL is the problem?  Can you explain the troubleshooting steps you are performed up to this point include the expected and actual results.

    Saturday, February 9, 2019 2:16 PM
  • User283528319 posted

    interesting but newly created tables were utf8 instead of db default latin5 and I think that was the cause of the problem. I changed them to latin5 and trying now

    Saturday, February 9, 2019 4:16 PM