source: ruby/branches/0.5/lib/open_ehr/rm/data_types/charset_extract.rb@ 238

Last change on this file since 238 was 130, checked in by KOBAYASHI, Shinji, 15 years ago

refs #51

  • Property svn:executable set to *
File size: 513 bytes
Line 
1#! /usr/bin/env ruby
2# charactor sets extraction from download file from
3# http://www.iana.org/assignments/character-sets
4# as character-sets
5
6class CharacterSets
7 def self.get_list
8 list = Array.new
9 open('character-sets') do |file|
10 while line = file.gets
11 if /^((Name:)|(Alias:)) (\S+)/ =~ line
12 list << $4 unless $4 == "None"
13 end
14 end
15 end
16 return list
17 end
18end
19
20open('charset.lst','w') do |f|
21 CharacterSets.get_list.each do |line|
22 f.puts(line)
23 end
24end
Note: See TracBrowser for help on using the repository browser.