Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 5, 2022

For columns of type SQL_TEXT, Firebird does not properly report the
actual column length, but rather only the maximum column length, so for
multi-byte encodings like UTF-8, such columns may have trailing
spaces. We work around that by treating such columns as SQL_VARYING
when we ask the server to describe the colum, what yields the desired
results.

Given that this is a work-around, and may break code which expects the
results with trailing spaces, we target "master" only.

For columns of type `SQL_TEXT`, Firebird does not properly report the
actual column length, but rather only the maximum column length, so for
multi-byte encodings like UTF-8, such columns may have trailing
spaces.  We work around that by treating such columns as `SQL_VARYING`
when we ask the server to describe the colum, what yields the desired
results.

Given that this is a work-around, and may break code which expects the
results with trailing spaces, we target "master" only.
@cmb69
Copy link
Member Author

cmb69 commented Jul 5, 2022

The FreeBSD CI issues are unrelated to this PR. The test passes on AppVeyor.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable workaround

@cmb69 cmb69 closed this in 2fc9e76 Jul 12, 2022
@cmb69 cmb69 deleted the cmb/gh8576 branch July 12, 2022 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDO_Firebird: Bad interpretation of length when char is UTF-8

2 participants