At 19:00 09/02/19, Tanaka Akira wrote:

>It seems the number, 40, is a number for "big enough for
>names".
>
>Why don't you use 40 bytes data format, both with Ruby 1.8
>and 1.9?
>
>Do you think that 40 bytes is not big enough for names in
>some country?

Very much so. A typical example would be Georgia, where
many names are as long as some of the longer ones in
Europe, but they require 3 bytes per character.


>> Also it seems to me that the current usage of the "limit" parameter of  
>> IO#gets is not intuitive in 1.9. It is "maximum number of bytes, but don't  
>> split a character", and I think it should be changed to mean "maximum  
>> number of chars". That would be much more obvious, more useful (IMHO), and  
>> still be backward compatible with 1.8.
>
>It is introduced for security reason.  bytes are more stable
>than characters.

Can you give more specific explanations of why reading a number
of characters might not be secure?

Regards,    Martin.


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