forked from ged/ruby-pg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Respect character encoding of all strings sent to the server.
Previously all strings sent to the server were sent in their internal binary representation, without respecting the character encoding of strings. Now the encoding of all strings is compared with the current connection encoding and converted if they are different. Since coders are independent from any database connection, this adds a second parameter to PG::Coder#encode, that allows to define the destination encoding, which previously was always ASCII_8BIT. This encoding should be set to the connection encoding, in practice. This also adds a lot of tests for encoding and decoding data. This implements issue ged#231 : https://bitbucket.org/ged/ruby-pg/issues/231
- Loading branch information
Showing
10 changed files
with
382 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.