Skip to content

Commit

Permalink
Fix encoding when writing .svg files
Browse files Browse the repository at this point in the history
  • Loading branch information
30350n committed May 5, 2024
1 parent fa275d9 commit 8a2a14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcb2blender_exporter/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def export_layers(board, bounds, output_directory: Path):
height = f"{bounds[3]:.6f}mm"
viewBox = " ".join(f"{value:.6f}" for value in bounds)
content = svg_header_regex.sub(svg_header_sub.format(width, height, viewBox), content)
filepath.write_text(content)
filepath.write_text(content, encoding="utf-8")

def sanitized(name):
return re.sub(r"[\W]+", "_", name)
Expand Down

0 comments on commit 8a2a14c

Please sign in to comment.