23 Apr
2005
23 Apr
'05
7:34 a.m.
Hello, I was undoubtedly surprised when I found out that I cannot pass unicode strings to Twisted. In 1.3 twisted.internet.abstract looks like this: def write(self, data): assert isinstance(data, str), "Data must be a string." if not self.connected: return and in 2.0: def write(self, data): if isinstance(data, unicode): # no, really, I mean it raise TypeError("Data must be not be unicode") Why do you mean it? Why I can't send unicode through twisted? It's ridiculous that I have to convert UTF8 strings to ISO on the client side and then once again from ISO to UTF8 on the server side, so I suppose you've got really good excuse. -- Michal Chruszcz -=- Never seen