From fa4d1ba1fbe4685dbab21825c7fa0bcbdc889b36 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 26 Feb 2021 14:56:27 +0100 Subject: Don't strip accents from job name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No idea why this was there in the first place. Our archeology attempts couldn't find out as to why it was introduced. We suspect an issue with other Qt versions. At least now ロボット.stl will not be mangled into ロホット.gcode upon saving (and german bears into bars) --- cura/UI/PrintInformation.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'cura/UI') diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 10318b3a8b..ae93b46fac 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -305,7 +305,7 @@ class PrintInformation(QObject): self.jobNameChanged.emit() return - base_name = self._stripAccents(self._base_name) + base_name = self._base_name self._defineAbbreviatedMachineName() # Only update the job name when it's not user-specified. @@ -401,11 +401,6 @@ class PrintInformation(QObject): self._abbr_machine = self._application.getMachineManager().getAbbreviatedMachineName(active_machine_type_name) - def _stripAccents(self, to_strip: str) -> str: - """Utility method that strips accents from characters (eg: â -> a)""" - - return ''.join(char for char in unicodedata.normalize('NFD', to_strip) if unicodedata.category(char) != 'Mn') - @pyqtSlot(result = "QVariantMap") def getFeaturePrintTimes(self) -> Dict[str, Duration]: result = {} -- cgit v1.2.3