utf 8 - MySQL truncates latin-1 data when inserting to UTF-8 column. How to get an error? -


OK, there was a problem when I was trying to insert a string that came in UTF-8 format when Actually Latin was -1. The problem was that the behavior varies between different servers:

  • Windows will return an error when a non-UTF8 char: "Wrong string value: '\ xD1OL S .... For the column [...] "

  • Linux will quietly add to whatever it gives until it first likes it, and then the rest

For once, I think the behavior of windows is one that I want. I see no option to make and make mysql Linux server even more difficult.

Now you are of one.

Thank you !.

OK, it was quick to have the problem, we had a 5.6 Linux server that was not in strict mode It was, however, that our DBA assured me that it was, so that we think it was a Linux problem.

Therefore, just activate STRICT_ALL_TABLES . Here's how to enable MySQL mode and how to:


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -