Reputation: 33
Trying to save models and i get a:
java.sql.SQLException: Incorrect string value: ...
Saving a text like "jedna dva tři kachna dům a kachní maso"
I'm using default.url="jdbc:mysql://[url]/[database]?characterEncoding=UTF-8"
Upvotes: 0
Views: 317
Reputation: 142208
řů
have no encoding in latin1; áõ
do. That suggests that CHARACTER SET latin1
is involved somewhere. Let's see SHOW CREATE TABLE
.
C599
, etc, are valid utf8 encodings for the corresponding characters.
?
occurs when the destination character set cannot represent the character. Again, this points to the column/table being latin1, when it should be utf8
(or utf8mb4
).
More discussion, and for debugging similar situations: Trouble with utf8 characters; what I see is not what I stored
Upvotes: 1
Reputation: 292
Probably has some special character, and the UTF-8 encode that you are forcing may cause some error.
This ASCII string has the following text:
String:
jedna dva tři kachna dům a kachní maso
ASCII:
'jedna dva t\xc5\x99i kachna d\xc5\xafm a kachn\xc3\xad maso'
Upvotes: 0