Hello Vit,

On 2009/09/07 22:21, Vit Ondruch wrote:
> Issue #2043 has been updated by Vit Ondruch.
>
>
> Thank you for the links. It was interesting.
>
> I'm looking forward Ruby 2.0 and their automatic conversions, since writing c = a.encode('utf-8') + b.encode('utf-8') to safely concatenate two strings is not sexy at all.

It isn't always clear what target encoding you would want when 
concatenating two strings with different encodings.

Also, in other programming languages, you cannot really concatenate 
strings with different encodings. There is either (a) only one encoding 
for all (internal) strings, or (b) concatenation happens on the octet 
level, which (in terms of characters) means that you get a big mess as a 
result.

It is likely that Ruby moves towards (a). It is already rather close to 
(a), in the sense that it's easy to write programs that work like (a). I 
suggest that you have a look at using the (a) model for the program you 
are working on, and see how it works, rather than to wait for Ruby to go 
into a direction that it may as well not choose to go.

Regards,    Martin.

-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst / it.aoyama.ac.jp