Page 1 of 1

Error: Incorrect string value (Input Chinese characters)

Posted: Mon Jan 16, 2023 12:04 pm
by lamany77

hi all
i've try to input chinese character on textbox
i've got error :

测试

"Failed to execute SQL. Error: Incorrect string value: '\xE6\xB5\x8B\xE8\xAF\x95' for column 'invoice' at row 1 (1366)"

any idea ?


Re: Input Chinese characters

Posted: Mon Jan 16, 2023 12:13 pm
by arbei

Check your database schema and the defined charset of your database/table/field.


Re: Error: Incorrect string value (Input Chinese characters)

Posted: Mon Jan 16, 2023 1:54 pm
by lamany77

i've try on datebase server

  1. set mysql tabel name "test" characterset : utf8
  2. set collation : utf8_general_ci

but not works


Re: Error: Incorrect string value (Input Chinese characters)

Posted: Mon Jan 16, 2023 5:11 pm
by arbei

But the error message did tell you that your database considered the utf-8 string incorrect.

  1. Check if the field "invoice" in your database is of string type (e.g. varchar) and has character set and collation specified. If unspecified, it should use the table's charset/collation and it should work.
  2. If you use MySQL 8, you better use utf8mb4 and collation for utf8mb4.
  3. Check your connection info and Database_Connecting server event (if any) to make sure you connect to to correct database.
  4. Make sure the project charset is also set to "utf-8".

Re: Error: Incorrect string value (Input Chinese characters)

Posted: Thu Jan 26, 2023 7:31 am
by lamany77

thank you for your detail explanation