diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-17 08:05:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-17 08:05:54 +0400 |
commit | 1cfbde0eb469f7d827b73667d7406eddc0065ceb (patch) | |
tree | 3765064220fa1247eab3240ccd464f49aa2962f4 /doc | |
parent | 68fa959de56f09f2dd575408699e4284eac77857 (diff) |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manpage/blender.1.py | 4 | ||||
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/manpage/blender.1.py b/doc/manpage/blender.1.py index 21df42a4082..0d43daccc5e 100644 --- a/doc/manpage/blender.1.py +++ b/doc/manpage/blender.1.py @@ -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") diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 9cbd6824bbb..fc17b9a24a5 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -658,7 +658,7 @@ def pycontext2sphinx(BASEPATH): char_array = c_char_p_p.from_address(attr) i = 0 while char_array[i] is not None: - member = ctypes.string_at(char_array[i]).decode() + member = ctypes.string_at(char_array[i]).decode(encoding="ascii") fw(".. data:: %s\n\n" % member) member_type, is_seq = type_map[member] fw(" :type: %s :class:`bpy.types.%s`\n\n" % ("sequence of " if is_seq else "", member_type)) |