Skip to content

Commit

Permalink
[#D3D-5979] Supports utf8 decoding for .gltf
Browse files Browse the repository at this point in the history
  • Loading branch information
loicSketchfab committed Jan 18, 2021
1 parent 8adf114 commit d2d14d7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion khronos-gltf.patch
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,13 @@ index 16a4242..02fd847 100644
+
self.log = log.logger
self.log_handler = log.hdlr


@@ -159,7 +163,7 @@ class glTFImporter():
# glTF file
if not self.is_glb_format:
self.content = None
- with open(self.filename, 'r') as f:
+ with open(self.filename, 'r', encoding='utf8') as f:
content = f.read()
try:
self.data = gltf_from_dict(json.loads(content, parse_constant=glTFImporter.bad_json_value))

0 comments on commit d2d14d7

Please sign in to comment.