General

Profile

xsimov (Xavier Simó)

  • Login: xsimov
  • Registered on: 06/20/2018
  • Last sign in: 06/21/2018

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

06/29/2018

02:14 PM Ruby Bug #14863: Array#join with empty array returns empty string always in US-ASCII encoding
I think it is not consistent because normally what I have seen the most is arrays of strings or containing strings being joined into one string.
In a case like that it so happens that all of the strings are in UTF-8 (because it is my ...
xsimov (Xavier Simó)

06/22/2018

08:28 AM Ruby Bug #14863: Array#join with empty array returns empty string always in US-ASCII encoding
Thanks for the clarification. What I try to solve with this proposal is the empty array #join returning a string which is in a different encoding that the encoding of the string returned by an array of strings #join, to improve consisten... xsimov (Xavier Simó)

06/21/2018

04:00 PM Ruby Bug #14863: Array#join with empty array returns empty string always in US-ASCII encoding
Taking into account
jeremyevans0 (Jeremy Evans) wrote:
> UTF-8 is the default for literal strings, not the default for all strings. Note that strings will automatically change their encoding from US-ASCII to UTF-8 if a UTF-8 string th...
xsimov (Xavier Simó)
09:18 AM Ruby Bug #14863 (Rejected): Array#join with empty array returns empty string always in US-ASCII encoding
Calling
~~~
irb(main):001:0> [].join.encoding
=> #<Encoding:US-ASCII>
~~~
returns an empty string and that empty string is always in US-ASCII encoding.
The expected result is that the returned empty string would be in UTF-8 sinc...
xsimov (Xavier Simó)

Also available in: Atom