diff --git a/Makefile b/Makefile index f2100938c9f065061faddb27c55890d6e4677305..75df8ef383c02cea1610e7e2724d09da7d8b87cf 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,6 @@ TARGETS: hostinfo all: $(TARGETS) -hostinfo: src/hostinfo.py $(wildcard src/hostinfo/*.py) Makefile +hostinfo: src/hostinfo.py $(sort $(wildcard src/hostinfo/*.py)) Makefile (cd src ; apa -o ../$@ $(filter %.py, $(^:src/%=%))) diff --git a/src/hostinfo.py b/src/hostinfo.py index 862f10a7b3c7b115796b6c14541cd67dfbf6c42b..e0d25530d9904720736ebf1ed2f4662b565bc4c8 100755 --- a/src/hostinfo.py +++ b/src/hostinfo.py @@ -325,7 +325,7 @@ if __name__ == '__main__': if options.mio: mio = hostinfo.mio.generate(tree) - print mio.encode("iso8859-1") + print mio.encode("utf-8") if options.named: for (f, c) in hostinfo.named.generate(tree, options): @@ -371,7 +371,7 @@ if __name__ == '__main__': f = open(name) conf = f.read() f.close() - write = conf != file[name].encode("iso8859-1") + write = conf != file[name].encode("utf-8") except IOError, e: write = True @@ -379,7 +379,7 @@ if __name__ == '__main__': print name result = 0 f = open(name, "w") - f.write(file[name].encode("iso8859-1")) + f.write(file[name].encode("utf-8")) f.close() for name in symlink.keys(): diff --git a/src/hostinfo/mio.py b/src/hostinfo/mio.py index c2670a23a7c8c882eba0fa2ca445ca79424e8610..9fcfe432d5ce077e01baa38c0700c4c6773dd8cd 100755 --- a/src/hostinfo/mio.py +++ b/src/hostinfo/mio.py @@ -2,7 +2,7 @@ import copy import hostinfo def generate(tree): - result = "<?xml version='1.0' encoding='iso8859-1'?>\n\n" + result = "<?xml version='1.0' encoding='utf-8'?>\n\n" mio = hostinfo.parser.Node("mio") for m in tree._mio_: mio = copy.deepcopy(m)