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

OVERLAY() fails when used with text BLOBs containing multi-byte chars [CORE3231] #3604

Closed
firebird-issue-importer opened this issue Nov 12, 2010 · 6 comments

Comments

@firebird-issue-importer

Submitted by: @paulvink

Relate to QA458

OVERLAY() fails in 2.1.3 if either the string itself or the overlay is a BLOB which contains multi-byte characters.

This works:

with q(s) as (
select cast('abcdefghijklmno' as blob sub_type 1 character set utf8) from rdb$database
)
select overlay (s placing cast('0123456789' as blob sub_type 1 character set utf8) from 5) from q

But this:

with q(s) as (
select cast('abcdefghijklmno' as blob sub_type 1 character set utf8) from rdb$database
)
select overlay (s placing cast(_iso8859_1 'áé' as blob sub_type 1 character set utf8) from 5) from q

fails with 335544565 - 'Cannot transliterate character between character sets'

The same is true if not the overlay but the string itself contains a multi-byte character anywhere (even if it's way before or after the overlay position).

If the string with the multi-byte character(s) is a (VAR)CHAR, everything works correctly. The result may still be a BLOB with multi-byte chars.

There may be more going on, because even with single-byte accented characters:

with q(s) as (
select cast('abcdefghijklmno' as blob sub_type 1 character set iso8859_1) from rdb$database
)
select overlay (s placing cast(_iso8859_1 'áé' as blob sub_type 1 character set iso8859_1) from 5) from q

the result is a 335544565 - 'Cannot transliterate character between character sets'

The connection character set was NONE in all examples.

In 2.5, everthing works correctly.

Commits: 5350f53

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 12, 2010

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 10, 2010

Commented by: @paulvink

After the experience with CORE3262, I hoped that this one too would be auto-solved in 2.1.4

But alas, it's not (using build 18370). Same in 2.1.4 final.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2011

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1.5 [ 10420 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 16, 2012

Modified by: @pmakowski

Link: This issue relate to QA458 [ QA458 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 16, 2012

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 16, 2015

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

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

Successfully merging a pull request may close this issue.

None yet
2 participants