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

Multibyte CHAR value requested as VARCHAR is returned with padded spaces. [CORE2606] #3016

Closed
firebird-issue-importer opened this issue Aug 28, 2009 · 14 comments

Comments

@firebird-issue-importer

Submitted by: Tsutomu Hayashi (tomneko)

Is related to QA545

Votes: 1

ON UTF8 CLIENT:

SELECT 'A' FROM RDB$DATABASE;

returns 'A '

ON SJIS_0208 CLIENT:

returns 'A '

* FB1.5 returns 'A' in any cases.

Commits: c081b76

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 29, 2009

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 29, 2009

Commented by: @asfernandes

This is not "blocker". This problem is present since 2.0, and FWIW many people does not even notice it.

It was discussed a number of times, and my hope is to have a fix in v3.0.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 29, 2009

Modified by: @asfernandes

priority: Blocker [ 1 ] => Major [ 3 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 29, 2009

Commented by: @asfernandes

Also, 1.5 is wrong in many cases with MBCS. You can't say it's right in a so small test case.

Just tries an union of 'A' with '<some multibyte char>' and see.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Aug 30, 2009

Commented by: Tsutomu Hayashi (tomneko)

Hi Adriano

It is not blocking the engine, but blocking migration from old applications or other databases.

I tested my web application from fb1.5 to fb2.1, but this blocked migration.

I tested MySQL and PostgreSQL, these are no problem.

SUMMARY:

CHAR Type

<Client UTF8>
CHAR(1) CHARACTER SET UTF8 returns 'A '
CHAR(1) CHARACTER SET ASCII returns 'A '

<Client ASCII>
CHAR(1) CHARACTER SET UTF8 returns 'A'
CHAR(1) CHARACTER SET ASCII returns 'A'

VARCHAR Type

<Client UTF8>
CHAR(1) CHARACTER SET UTF8 returns 'A '
CHAR(1) CHARACTER SET ASCII returns 'A'

<Client ASCII>
CHAR(1) CHARACTER SET UTF8 returns 'A'
CHAR(1) CHARACTER SET ASCII returns 'A'

* SJIS_0208 and EUCJ_0208 returns 'A ', so these are 2 byte set.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Oct 24, 2009

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 5, 2011

Modified by: @asfernandes

summary: Select Literal returns right pad string => Multibyte CHAR value requested as VARCHAR is returned with padded spaces.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 5, 2011

Modified by: @asfernandes

Version: 3.0 Initial [ 10301 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 5, 2011

Commented by: @asfernandes

Now when user request the value as VARCHAR (SQL_VARYING), the correct length is returned.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 5, 2011

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Mar 29, 2014

Modified by: @pcisar

Link: This issue is related to QA545 [ QA545 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Jan 18, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 15, 2016

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 15, 2016

Modified by: @pavel-zotov

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

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

2 participants