Skip to content

Commit

Permalink
Merge pull request #541 from drdrsh/mostafa_set-internal-encoding
Browse files Browse the repository at this point in the history
Call pgconn_set_internal_encoding_index in all branches of pgconn_set_default_encoding
  • Loading branch information
larskanis authored Aug 31, 2023
2 parents 6629dec + 739093b commit 766c155
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/pg_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -4180,6 +4180,7 @@ pgconn_set_default_encoding( VALUE self )
if ( pgconn_set_client_encoding_async(self, rb_str_new_cstr(encname)) != 0 )
rb_warning( "Failed to set the default_internal encoding to %s: '%s'",
encname, PQerrorMessage(conn) );
pgconn_set_internal_encoding_index( self );
return rb_enc_from_encoding( enc );
} else {
pgconn_set_internal_encoding_index( self );
Expand Down

0 comments on commit 766c155

Please sign in to comment.