Created
January 27, 2012 14:16
-
-
Save tcaddy/1688976 to your computer and use it in GitHub Desktop.
Convert Datatel export files to UTF-8 using Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
I am using Ruby to parse exported data generated from Datatel. I ran into a strange problem with conflicting character sets. | |
Datatel's internal character set is: ISO_8859-1 | |
Datatel will set the metadata in the export text file to be: US-ASCII | |
And I want Ruby to use this charset: UTF-8 | |
=end | |
Iconv.new("UTF-8","ISO_8859-1").iconv(File.open('datatel_export_file.txt').read) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment