Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Jul 26, 2023

  • updated DecodeOctal function to operate with runes instead of bytes. previously it returned error on any not printable symbol that applies to every unicode symbol
  • updated PostgreSQL data coder/decoder. now it uses info from the ColumnEncryptionSetting and always encodes into hex/octal format if destination type is not specified as text. Acra expects bytea/blob type on database side and default dest type is binary. Postgresql's bytea type expects hex/octal string, it doesn't work with escaped strings E''
  • updated integration tests to use unicode strings

Checklist

@Lagovas Lagovas requested a review from Zhaars July 26, 2023 13:30
Copy link
Contributor

@Zhaars Zhaars left a comment

Choose a reason for hiding this comment

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

lgtm

@Lagovas
Copy link
Collaborator Author

Lagovas commented Jul 26, 2023

Unfortunately, I removed using unicode strings from the integration tests due to MySQL driver is outdated and works incorrectly with utf8 charset and need to be updated. I plan to do it in the separate PR. I already tested the freshest mysql-connector-python 8.1.0 and it looks like fixed a lot of problems (encodings, hardcoded TLSv1, conversion to python types) but now it correctly handles binary types and charset sent from the server. So, we need to merge our fixes in #662 to not hack tests with decoding bytearray type to string)

So lets do it in separate PR after merging #662

@Lagovas Lagovas merged commit 6780703 into master Jul 26, 2023
@Lagovas Lagovas deleted the lagovas/improve-unicode-support branch July 26, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants