jython and concatenation of strings

Nick Coghlan ncoghlan at iinet.net.au
Wed Dec 15 13:27:12 CET 2004

Jan Gregor wrote:
> StringBuffer class from java was right solution - yours looses encoding,
> and in jython I was unable to get it back - in python it worked fine.

If you mean that Jython returned a string, when the inputs were unicode, then 
that can probably be fixed with:

result = u''.join(string_list)

(Python switches to the unicode version automatically if it finds any unicode 
strings in the supplied sequence. Jython may not do that - I'm not a Jython user 
though, so I'm not sure).


Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia

More information about the Python-list mailing list