lib/sportdb/readers/season.rb in sportdb-1.9.10 vs lib/sportdb/readers/season.rb in sportdb-1.9.11

- old
+ new

@@ -11,10 +11,16 @@ # e.g. lets you use Usage instead of Model::Usage include Models def self.from_zip( zip_file, entry_path ) - ## to be done + ## get text content from zip + entry = zip_file.find_entry( entry_path ) + + text = entry.get_input_stream().read() + text = text.force_encoding( Encoding::UTF_8 ) + + self.from_string( text ) end def self.from_file( path ) ## note: assume/enfore utf-8 encoding (with or without BOM - byte order mark) ## - see textutils/utils.rb