util/local_database/qlocalexml2cpp.py
changeset 29 b72c6db6890b
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
25:e24348a560a6 29:b72c6db6890b
   543     print
   543     print
   544 
   544 
   545     # Country code list
   545     # Country code list
   546     print "static const unsigned char country_code_list[] ="
   546     print "static const unsigned char country_code_list[] ="
   547     for key in country_map.keys():
   547     for key in country_map.keys():
   548         print "\"%2s\" // %s" % (country_map[key][1], country_map[key][0])
   548         code = country_map[key][1]
       
   549         if len(code) == 2:
       
   550             code += "\\0"
       
   551         print "\"%2s\" // %s" % (code, country_map[key][0])
   549     print ";"
   552     print ";"
   550 
   553 
   551 
   554 
   552 if __name__ == "__main__":
   555 if __name__ == "__main__":
   553     main()
   556     main()