Sha256: bdf53013211594ebb792b1f0816820064fa369c6a31a37d81c9a3e96beafc197
Contents?: true
Size: 513 Bytes
Versions: 39
Compression:
Stored size: 513 Bytes
Contents
#! /usr/bin/env ruby # charactor sets extraction from download file from # http://www.iana.org/assignments/character-sets # as character-sets class CharacterSets def self.get_list list = Array.new open('character-sets') do |file| while line = file.gets if /^((Name:)|(Alias:)) (\S+)/ =~ line list << $4 unless $4 == "None" end end end return list end end open('charset.lst','w') do |f| CharacterSets.get_list.each do |line| f.puts(line) end end
Version data entries
39 entries across 39 versions & 2 rubygems