Skip to content

Commit

Permalink
Call pgconn_set_internal_encoding_index in all branches of pgconn_set…
Browse files Browse the repository at this point in the history
…_default_encoding
  • Loading branch information
drdrsh committed Aug 30, 2023
1 parent 6629dec commit 739093b
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 739093b

Please sign in to comment.