From: duplo Date: Fri, 24 Apr 2009 13:49:52 +0000 (+0000) Subject: Don't permit to use non ASCII characters. X-Git-Tag: 2.1.0~20 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=72c5f5cde2bc9ffe5427d65bb8f798bf8c4a0cce;p=bertos.git Don't permit to use non ASCII characters. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2662 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index dce305e0..b6038ae3 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -91,6 +91,11 @@ class BFolderPage(BWizardPage): """ Slot called when the project name is changed manually by the user. """ + try: + name = unicode(name).encode("ascii") + except UnicodeEncodeError: + name = self._project_name + self.pageContent.nameEdit.setText(name) self._project_name = unicode(name).replace(" ", "_") self.setProjectPath()