Skip to content
Permalink
Browse files

[sextante] allow non-ASCII characters in string parameters

  • Loading branch information
alexbruy committed Apr 10, 2013
1 parent 4219eb1 commit dbbc988135a28805a5bd558b5e979ebd75d2824e
Showing with 4 additions and 4 deletions.
  1. +4 −4 python/plugins/sextante/parameters/ParameterString.py
@@ -40,19 +40,19 @@ def setValue(self, obj):
if obj is None:
self.value = self.default
return True
self.value = str(obj).replace(ParameterString.ESCAPED_NEWLINE,ParameterString.NEWLINE)
self.value = unicode(obj).replace(ParameterString.ESCAPED_NEWLINE,ParameterString.NEWLINE)
return True

def getValueAsCommandLineParameter(self):
return "\"" + str(self.value.replace(ParameterString.NEWLINE,ParameterString.ESCAPED_NEWLINE)) + "\""
return "\"" + unicode(self.value.replace(ParameterString.NEWLINE,ParameterString.ESCAPED_NEWLINE)) + "\""

def serialize(self):
return self.__module__.split(".")[-1] + "|" + self.name + "|" + self.description +\
"|" + str(self.default)
"|" + unicode(self.default)

def deserialize(self, s):
tokens = s.split("|")
return ParameterString(tokens[0], tokens[1], tokens[2])

def getAsScriptCode(self):
return "##" + self.name + "=string " + self.default
return "##" + self.name + "=string " + self.default

0 comments on commit dbbc988

Please sign in to comment.
You can’t perform that action at this time.