epgsql
epgsql copied to clipboard
Unicode support
I managed to get partially unicode read support with Erlang 16B: By changing the file 'pgsql_wire.erl' as following using the io_lib:format statement:
decode_data([C | T], <<Len:?int32, Value:Len/binary, Rest/binary>>, Acc) ->
case C of
#column{type = Type, format = 1} -> Value2 = pgsql_binary:decode(Type, Value);
#column{} ->
Value2 = io_lib:format("~ts",[Value]),
end,
decode_data(T, Rest, [Value2 | Acc]).
For my table it worked, I am not sure if there are any drawbacks.