Last change
on this file since 314 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 |
|
---|
6 | class 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
|
---|
18 | end
|
---|
19 |
|
---|
20 | open('charset.lst','w') do |f|
|
---|
21 | CharacterSets.get_list.each do |line|
|
---|
22 | f.puts(line)
|
---|
23 | end
|
---|
24 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.