Skip to content

Commit

Permalink
support writing and reading of utf-8 strings
Browse files Browse the repository at this point in the history
  • Loading branch information
typemytype committed Mar 18, 2020
1 parent 6ecb3d8 commit 56e6d49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions GlyphConstruction.roboFontExt/info.plist
Expand Up @@ -30,8 +30,8 @@
<key>requiresVersionMinor</key>
<string>5</string>
<key>timeStamp</key>
<real>1584475621.6245382</real>
<real>1584529483.6293812</real>
<key>version</key>
<string>0.8.1</string>
<string>0.8.2</string>
</dict>
</plist>
Expand Up @@ -808,7 +808,7 @@ def _saveFile(self, path):
if self.font is not None:
self.font.lib[self.fileNameKey] = os.path.splitext(os.path.basename(path))[0]
txt = self.constructions.get()
f = open(path, "w")
f = open(path, "w", encoding="utf-8")
f.write(txt)
f.close()

Expand All @@ -822,7 +822,7 @@ def saveFile(self, sender=None):
self.showPutFile(["glyphConstruction"], fileName=preferredName, callback=self._saveFile)

def setFile(self, path):
f = open(path, "r")
f = open(path, "r", encoding="utf-8")
txt = f.read()
f.close()

Expand Down
4 changes: 2 additions & 2 deletions LibExtension/glyphConstructionController.py
Expand Up @@ -808,7 +808,7 @@ def _saveFile(self, path):
if self.font is not None:
self.font.lib[self.fileNameKey] = os.path.splitext(os.path.basename(path))[0]
txt = self.constructions.get()
f = open(path, "w")
f = open(path, "w", encoding="utf-8")
f.write(txt)
f.close()

Expand All @@ -822,7 +822,7 @@ def saveFile(self, sender=None):
self.showPutFile(["glyphConstruction"], fileName=preferredName, callback=self._saveFile)

def setFile(self, path):
f = open(path, "r")
f = open(path, "r", encoding="utf-8")
txt = f.read()
f.close()

Expand Down
2 changes: 1 addition & 1 deletion build-extension.py
Expand Up @@ -27,7 +27,7 @@
B.name = "Glyph Construction"
B.developer = 'Frederk Berlaen'
B.developerURL = 'http://typemytype.com/'
B.version = '0.8.1'
B.version = '0.8.2'
B.launchAtStartUp = True
B.mainScript = 'glyphConstructionUIStartUp.py'
B.html = True
Expand Down

0 comments on commit 56e6d49

Please sign in to comment.