Changeset 908 for kde/kreadconfig


Ignore:
Timestamp:
Jul 1, 2010, 5:23:15 PM (14 years ago)
Author:
joergs
Message:

bugfix: handling utf-8 characters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kde/kreadconfig/kread-ressource.py

    r817 r908  
    5656        immutaleString = "[$i]"
    5757      try:
    58         print i + immutaleString, "=", config.readEntry( i ).toUtf8()
     58        value = config.readEntry( i ).toUtf8()
     59        print "{0}{1}={2}".format( i, immutaleString, value )
    5960      except AttributeError:
    6061      # ignore when readEntry does not exist
     
    116117
    117118# TODO: check valid resource types (otherwise, this application starts a crash report
    118 type = args.getOption("type");
     119resourcetype = args.getOption("type");
    119120
    120121configfilename = args.arg(0)
     
    122123
    123124#try:
    124 config = KConfig(configfilename, KConfig.NoGlobals, type)
     125config = KConfig(configfilename, KConfig.NoGlobals, resourcetype)
    125126#except:
    126127    #print "Unexpected error:", sys.exc_info()[0]
Note: See TracChangeset for help on using the changeset viewer.