# this will be a unicode string in Py3, so make sure we can decode it
try:
self.value.decode(self.value.encoding)
exceptUnicodeDecodeError:
error(self.pos,"String decoding as '%s' failed. Consider using a byte string or unicode string explicitly, or adjust the source code encoding."%self.value.encoding)