Skip to content

Commit

Permalink
Addapt default encoding in SQL Server
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsuyui committed Nov 24, 2017
1 parent 2e194cf commit 1daae16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/table_memo_raw_dataset_column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def format_value(value)
when 'timestamp'
'0x' + value.unpack('H*')[0]
else
value.to_s.encode(Encoding.default_internal, datasource_encoding).gsub(/\u0000/, '')
dst_enc = Encoding.default_internal or 'UTF-8'
value.to_s.encode(dst_enc, datasource_encoding).gsub(/\u0000/, '')
end
else
case sql_type
Expand Down

0 comments on commit 1daae16

Please sign in to comment.