Unverified Commit 325b5820 authored by Nathan Van Overloop's avatar Nathan Van Overloop
Browse files

centralnic/issues#4052: adapt with new list

parent 34915cfe
.php_cs.dist
{"php":"7.4.6","version":"2.16.1","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":{"case":"lower"},"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"declare_equal_normalize":{"space":"single"},"array_syntax":{"syntax":"long"},"object_operator_without_whitespace":true,"binary_operator_spaces":true,"no_alternative_syntax":true,"php_unit_method_casing":{"case":"camel_case"},"class_attributes_separation":{"elements":["method"]},"no_blank_lines_after_phpdoc":true,"phpdoc_indent":true,"phpdoc_align":{"align":"vertical"}},"hashes":{"bin\/build.php":137893529,"bin\/icann-reservedNames-to-text.php":1798961049}}
\ No newline at end of file
aalco
acp
acs
acto
adb
afdb
aipo
aladi
apo
appa
aripo
asean
au
bceao
benelux
bie
bipm
bis
boip
bsec
bstdp
caf
can
caricom
ceb
cen-sad
cept
cern
cfc
cica
ciheam
cis
coe
coi
comesa
commonwealth
cplp
csto
ctbto
ctu
eabr
eac
eapo
ebrd
ec
ecb
eccas
ecmt
ecmwf
eco
ecowas
eeas
efi
efta
eftasurv
eib
embl
encharter
ep
epo
esa
eso
eu
euclid
euco
eurasec
euratom
eurocontrol
europol
fao
forumsec
gcc
guam
hcch
iaca
iadb
iaea
ibrd
icao
icc-cpi
icco
icglr
icj-cij
icmpd
ico
icsid
ida
idb
idea
idlo
iea
ifad
ifas
ifc
igad
ihffc
iho
iic
iila
ijc
ilo
imf
imo
imso
interelectro
interpol
intracen
iom
iooc
irena
isa
iso
istc
iter
itf
itlos
itso
itto
itu
iucn
iwc
las
mercosur
miga
mrc
nasco
nato
nib
npi
oas
occar
oecd
oecs
ofid
ohada
oic
oie
oif
oiv
opanal
opcw
opec
osce
paho
pam
parlatino
pca
pices
ppd
puasp
recsa
saarc
sadc
sco
sela
sica
spc
uemoa
un
un-habitat
unaids
unasur
unccd
unctad
undp
unep
unesco
unfccc
unfpa
unhcr
unicc
unicef
unido
unidroit
unops
unrwa
unu
unwomen
unwto
upeace
upov
upu
wco
wfp
who
wipo
wmo
wto
This diff is collapsed.
......@@ -3,17 +3,17 @@ olympiad
olympique
olympiade
olympisch
olímpico
olimpíada
أوليمبي
أوليمبياد
奥林匹克
奥林匹亚
奧林匹克
奧林匹亞
ολυμπιακοί
ολυμπιάδα
올림픽
올림피아드
олимпийский
олимпиада
xn--olmpico-8ya
xn--olimpada-g2a
xn--igbk7fennc
xn--igbic3azhgtrc
xn--74qv0co1jlpq
xn--jlq85io9flpq
xn--74qv0cu1jdpq
xn--nlq05iu9fdpq
xn--kxadxfcgtff2c
xn--hxakisjgtk7b
xn--4y2bl1uwwl
xn--hy1bl6gb7lq0a546c
xn--h1aaadbedjpny
xn--80aaloaqinm
This diff is collapsed.
redcross
red-cross
redcrescent
red-crescent
redcrystal
red-crystal
redlionandsun
red-lion-and-sun
magendavidadom
magen-david-adom
redstarofdavid
red-star-of-david
croixrouge
croix-rouge
croissantrouge
croissant-rouge
cristalrouge
cristal-rouge
lionetsoleilrouge
lion-et-soleil-rouge
lionetsoleilrouges
lion-et-soleil-rouges
cruzroja
cruz-roja
medialunaroja
media-luna-roja
cristalrojo
cristal-rojo
leónysolrojos
león-y-sol-rojos
красныйкрест
красный-крест
красныйполумесяц
красный-полумесяц
красныйкристалл
красный-кристалл
красныйлевисолнце
красный-лев-и-солнце
מגןדודאדום
מגן-דוד-אדום
מגן-דודאדום
الصليب-الأحمر
الهلال-الأحمر
الكريستالة-البلورة-الحمراء
الأسد-و-الشمس-الحمراوان
红十字
红新月
红水晶
红狮与太阳
红-十-字
红-新-月
红-水-晶
红-狮-与-太-阳
红-十字
红-新月
红-水晶
红狮-与-太阳
icrc
cicr
ifrc
ficr
redcross
red-cross
redcrescent
red-crescent
redcrystal
red-crystal
redlionandsun
red-lion-and-sun
croixrouge
croix-rouge
croissantrouge
croissant-rouge
cristalrouge
cristal-rouge
lionetsoleilrouge
lion-et-soleil-rouge
cruzroja
cruz-roja
medialunaroja
media-luna-roja
cristalrojo
cristal-rojo
xn--lenysolrojos-1hb
xn--len-y-sol-rojos-wrb
xn--80aklccqteffl6h
xn----7sbqoddswffgm4i
xn--80aklchgejigmhx9b1dvd
xn----7sbqodjheljgniz2c2d0d
xn--80aaxddcjam2aeifo3k
xn----7sbb5adedkan5afigp1l
xn--80aeibodfkdogkspg7fsd
xn------5cdlrdweiofrjnvsj2h1d
xn--igbhad1ayx3jbcn8c
xn----rmckbd7a2a0a8kbdo2d
xn--igbhaa5ay2kabbnq
xn----rmckab1b2a0mabcor
xn--ggblaaaafgcf3b2bfdu8wqafcbdx7dwb
xn-----usdvabbaghdg1c7bgew00asafdbez2eyb
xn--igbhbaaa4bnvpcl7rednevzl
xn------6yetdbaa2dq4aseo3wgepfy3an
xn--kkr01qny4a
xn--efvv3a313c
xn--1kvs1kn4r
xn--jhqs4ylzunwk7v2a
icrc
cicr
ifrc
ficr
mkkk
xn--j1aae6a
spr
frk
cvtl
xn--j1afdfp
xn--tgmj-6ra
xn--t-cubfh
xn--j1aheq
NET_IDNA2
\ No newline at end of file
git clone git@github.com:pear/Net_IDNA2.git
<?php
// generate an XML registry file from plain text files using a template
chdir("Net_IDNA2");
require('Net/IDNA2.php');
$idn = new Net_IDNA2;
$doc = DOMDocument::load('registry.xml.in');
$doc= new DOMDocument();
chdir("../..");
$doc->load('registry.xml.in');
$registries = $doc->getElementsByTagName('registry');
for ($i = 0 ; $i < $registries->length ; $i++) {
$registry = $registries->item($i);
$file = $registry->getAttribute('id').'.txt';
if (!file_exists($file)) continue;
if (!file_exists($file)) {
continue;
}
$lines = array_map('trim', file($file));
foreach ($lines as $line) {
$line = preg_replace('/\s*#.*/', '', $line);
if (empty($line)) continue;
if (empty($line)) {
continue;
}
$record = $doc->createElement('record');
$name = $doc->createElement('name', $line);
$label = $doc->createElement('label', $idn->encode($line));
if (preg_match('/^xn--/', $line)) {
$label = $doc->createElement('label', $line);
}
else {
$label= $doc->createElement('label',$idn->encode($line));
}
$record->appendChild($name);
$record->appendChild($label);
$registry->appendChild($record);
......
<?php
// parse the "Reserved Names for New gTLDs" XML file and split to plain text files
$doc = DOMDocument::load('http://www.icann.org/sites/default/files/packages/reserved-names/ReservedNames.xml');
$doc = new DOMDocument();
$doc->load('reserved.xml');
$registries = $doc->getElementsByTagName('registry');
for ($i = 0 ; $i < $registries->length ; $i++) {
$registry = $registries->item($i);
$id = $registry->getAttribute('id');
if ('reservedNames' == $id) continue;
if ('reservedNames' == $id) {
continue;
}
$fh = fopen(sprintf("../S5.5-%s.txt", strtolower($id)), 'w');
$records = $registry->getElementsByTagName('record');
for ($j = 0 ; $j < $records->length ; $j++) {
$label1 = $records->item($j)->getElementsByTagName('label1');
fwrite($fh, $label1->item(0)->textContent."\n");
$fh = fopen(sprintf("S5.5-%s.txt", strtolower($id)), 'w');
$label2 = $records->item($j)->getElementsByTagName('label2');
if (isset($label2) && $label2->item(0)->textContent != "") {
fwrite($fh, $label2->item(0)->textContent."\n");
}
}
$names = $registry->getElementsByTagName('name');
for ($j = 0 ; $j < $names->length ; $j++) fwrite($fh, $names->item($j)->textContent."\n");
fclose($fh);
}
This diff is collapsed.
This diff is collapsed.
......@@ -62,7 +62,21 @@
<description>Reservation at second level</description>
</registry>
<registry id="s5.5-red-cross">
<registry id="s5.5-igos-2">
<title>Intergovernmental Organizations</title>
<xref type="uri" data="http://www.icann.org/en/resources/registries/reserved" />
<registration_rule>Not defined by an RFC, assigned by ICANN</registration_rule>
<description>Reservation at second level</description>
</registry>
<registry id="s5.5-red-cross1">
<title>International Red Cross and Red Crescent Movement - National Red Cross and Red Crescent Societies Names</title>
<xref type="uri" data="http://www.icann.org/en/resources/registries/reserved" />
<registration_rule>Not defined by an RFC, assigned by ICANN</registration_rule>
<description>Reservation at second level</description>
</registry>
<registry id="s5.5-red-cross2">
<title>International Red Cross and Red Crescent Movement - National Red Cross and Red Crescent Societies Names</title>
<xref type="uri" data="http://www.icann.org/en/resources/registries/reserved" />
<registration_rule>Not defined by an RFC, assigned by ICANN</registration_rule>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment