Bug #113518 | character set with Chinese character,using storage procedure it report 1300 err | ||
---|---|---|---|
Submitted: | 27 Dec 2023 3:41 | Modified: | 3 Jan 2024 2:40 |
Reporter: | z yz | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 8.0.32, 8.0.35 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Dec 2023 3:41]
z yz
[27 Dec 2023 13:17]
MySQL Verification Team
Hello, Thank you for the bug report. Could you please try adding character set to the stored procedure as below CREATE PROCEDURE `testproc1`(IN p_dyn_para_code varchar(20) character set gb2312, OUT p_parameter_value VARCHAR(5000)) For more info about MySQL Chinese character set, please see https://dev.mysql.com/doc/refman/8.0/en/faqs-cjk.html Regards, Ashwini Patil
[28 Dec 2023 3:14]
z yz
hi i have add the character set when create procedure i re-create the procedure like : mysql> delimiter // mysql> CREATE PROCEDURE `testproc1`( -> IN p_dyn_para_code varchar(20) character set gb2312, -> OUT p_parameter_value VARCHAR(5000)) -> BEGIN -> -> DECLARE p_msg_config VARCHAR(10000); -> SET p_parameter_value = ''; but it also meet the error : mysql> CALL `testproc1`('A', @parameter_value); Query OK, 0 rows affected (0.00 sec) mysql> CALL `testproc1`('B', @parameter_value); ERROR 1300 (HY000): Invalid latin1 character string: '\xE4\xB8\xAD\xE6\x96\x87' mysql>
[28 Dec 2023 12:38]
MySQL Verification Team
Hello! Thank you for the details. I tried to reproduce your issue using given procedure with char set gb2312 added to the IN parameter, but I am not seeing any issues at my end. Try to add char set that is appropriate to your system from the link below https://dev.mysql.com/doc/refman/8.0/en/faqs-cjk.html Let us know if you are still facing the issue. Thanks. Regards, Ashwini Patil
[3 Jan 2024 2:40]
z yz
hello Ashwini Patil are you using the latin1 character set ? if using the default utf8 character set and using mysql 8.0.32 and above version, this issue can reproduce
[3 Jan 2024 12:39]
MySQL Verification Team
Hello! are you using the latin1 character set ? --> No, I used gb2312 and other Chinese char set that are mentioned in https://dev.mysql.com/doc/refman/8.0/en/faqs-cjk.html Also, tried with utf8mb4, not seeing any issues at my end. `testproc1`(IN p_dyn_para_code varchar(20) character set utf8mb4, OUT p_parameter_value VARCHAR(5000)) Regards, Ashwini Patil
[3 Jan 2024 12:42]
MySQL Verification Team
Bug #113536 marked as duplicate of this one.