pass encoding to uses of decode() incase the default isnt utf-8. ignore decode errors in some cases.

This should fix an error with generated qtcreator projects.

also replace decoded bytes for unicode escape sequences in the VIEW3D_MT_edit_text_chars menu.
This commit is contained in:
Campbell Barton
2011-11-17 04:05:54 +00:00
parent 68fa959de5
commit 1cfbde0eb4
5 changed files with 25 additions and 23 deletions

View File

@@ -52,9 +52,9 @@ else:
cmd = [blender_bin, "--help"]
print(" executing:", " ".join(cmd))
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode()
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8")
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8").strip()
blender_version = blender_version.split("Build")[0]
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")