nakagami/firebirdex

encoding not found

Closed this issue · 2 comments

hmm, strange. When trying to use 0.3.3 in a project I get the following error message when doing a query with charset: :cp1252 as a connection option.

[error] GenServer #PID<0.844.0> terminating
** (DBConnection.ConnectionError) client #PID<0.967.0> stopped: ** (Codepagex.Error) Unknown encoding :"VENDORS/MICSFT/WINDOWS/CP1252"
(codepagex 0.1.6) lib/codepagex.ex:519: Codepagex.from_string!/4
(firebirdex 0.3.3) lib/firebirdex/connection.ex:62: Firebirdex.Connection.handle_prepare/3
(db_connection 2.4.2) lib/db_connection/holder.ex:354: DBConnection.Holder.holder_apply/4
(db_connection 2.4.2) lib/db_connection.ex:1349: DBConnection.prepare/4
(db_connection 2.4.2) lib/db_connection.ex:1342: DBConnection.run_prepare/4
(db_connection 2.4.2) lib/db_connection.ex:1354: DBConnection.run_prepare_execute/5
(db_connection 2.4.2) lib/db_connection.ex:1459: DBConnection.run/6
(db_connection 2.4.2) lib/db_connection.ex:595: DBConnection.parsed_prepare_execute/5
(db_connection 2.4.2) lib/db_connection.ex:587: DBConnection.prepare_execute/4
(firebirdex 0.3.3) lib/firebirdex.ex:23: Firebirdex.query/4

OK, found it. It is linked to the following in Codepagex:
https://github.com/tallakt/codepagex#encoding-selection

This is necessary due to the fact that Codepagex's configuration changes are not picked up automatically when it's a dependency in another project. Credit for the find goes to @michalmuskala here: https://elixirforum.com/t/sharing-with-the-community-text-transcoding-libraries/17962/2

Should we include an explanation also in an Encoding section in the Firebirdex Readme?

Since few people (who had installed 0.3.3) encounter this error, I will not add an explanation to the README