Closed rywall closed 5 years ago
Since a dbf file can contain binary data we open the file with 'rb' options which sets the default encoding to ASCII-8BIT. If you know that your file is encoded as UTF-8, set the encoding when opening the file:
DBF::Table.new('Tit.dbf', nil, 'UTF-8').encoding
=> "UTF-8"
Makes sense, thanks!
For this DBF file Tit.dbf.zip the header encoding is
nil
and I am not passing in an encoding, so I would expect the encoding to be the default encoding (UTF-8) but instead it is ASCII-8BIT. Why is this the case?