You should know what encoding is used in your database.
SHOW server_encoding;
When you connect to your database you can specify what encoding should your client use:
SET client_encoding TO 'UTF8';
If server and client encoding differ, the database driver tries to translate between those two encoding. When it can not find an equivalent character, the error is thrown.
So server encoding and client encoding should be the same to avoid problems like yours.
To fix your problem:
- connect to your database
- set
client_encoding
to UTF8
- update the row with Japanese characters
To avoid this problem in the future remember to set client_encoding
to proper value when you connect to the database.
Check the documentation on Supported Character Sets.