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-automations opened this issue Aug 28, 2009 · 14 comments

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 3.0 Initial [ 10301 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA545 [ QA545 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

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