Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generate_unicode_from_results.py « osm_unique_char_counter « tools - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9a9fdb285bdd8e0d3ea2b46bc8a700dbd871d8a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Creates file with all OSM unicode chars inside.
# This file can be used as input for BMFont program
# to select symbols used in OSM.

import codecs
    
f = open("results.txt", "r")
lines = f.readlines()
f.close()

# clear some garbage from results
lines.remove("Code\tCount\t#\tSymbol\n")
lines.remove("=========================================================\n")
lines.pop()
lines.pop()


f = codecs.open('results.unicode', 'w', 'utf-16')
for line in lines:
  f.write( unichr(int(line[0:line.find("\t")])) )