Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed string when raising exception with non-ascii characters [CORE5722] #5988

Open
firebird-automations opened this issue Jan 23, 2018 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Lauri Zoova (lz)

C:\Program Files\Firebird\Firebird_3_0>chcp 1257
Active code page: 1257

C:\Program Files\Firebird\Firebird_3_0>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set names none;
SQL> create database 'c:\test\testdb.fdb' user 'SYSDBA' password 'masterkey' default character set none;
SQL> commit;
SQL> connect 'localhost/3060:c:\test\testdb.fdb' user 'SYSDBA' password 'masterkey';
Database: 'localhost/3060:c:\test\testdb.fdb', User: SYSDBA
SQL> create exception ex_1 'Üldse ei tööta!';
SQL> create exception ex_2 '@1';
SQL> commit;
SQL> set term !;

// bug - when exception with message override
// this works as expected (=we get the override message instead of "Malformed string") in v2.5.7
SQL> execute block
CON> as
CON> begin
CON> exception ex_1 'Nägin vaeva küll aga välja kukkus nagu tavaliselt!';
CON> end!
Statement failed, SQLSTATE = 22000
Malformed string
-At block line: 4, col: 1

// works - when original exception message
SQL> execute block
CON> as
CON> begin
CON> exception ex_1;
CON> end!
Statement failed, SQLSTATE = HY000
exception 1
-EX_1
-Üldse ei tööta!
-At block line: 4, col: 1

// works - when using new exception parameter
// probably because this specific case was fixed by Adriano in CORE4160
SQL> execute block
CON> as
CON> begin
CON> exception ex_2 using ('Täitsa nagu toimiks?');
CON> end!
Statement failed, SQLSTATE = HY000
exception 2
-EX_2
-Täitsa nagu toimiks?
-At block line: 4, col: 1

SQL>quit!

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

On linux I could not reproduce an error:

SQL> execute block as begin exception ex_1 'Русский текст'; end!
Statement failed, SQLSTATE = HY000
exception 6
-EX_1
-Русский текст

i.e. words 'Russkij tekst' passed as parameter caused no error and were displayed successfully.

@firebird-automations
Copy link
Collaborator Author

Commented by: Lauri Zoova (lz)

I've retested the issue with version 3.0.4 and unfortunately the problem remains.

@firebird-automations
Copy link
Collaborator Author

Modified by: Lauri Zoova (lz)

Version: 3.0.4 [ 10863 ]

environment: Windows

Version: 3.0.2 [ 10785 ] =>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant