[swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread Benoit Pereira da silva via swift-users
Dear all I've found a serious Bug in JSONEncoder SR-6131 and would like to fix it. This bug cause JSON encoding issues on Double when using a local that does not use dot as decimal separator e.g « fr_FR » (we use a coma) Demonstration of the issue :

[swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread Benoit Pereira da silva via swift-users
Dear all I've found a serious Bug in JSONEncoder SR-6131 and would like to fix it. This bug cause JSON encoding issues on Double when using a local that does not use dot as decimal separator e.g « fr_FR » (we use a coma) Demonstration of the issue :

Re: [swift-users] Incorrect Fisher-Yates shuffle in example code

2017-12-18 Thread Ankit Aggarwal via swift-users
Thank you for working on this! On Sun, Dec 17, 2017 at 11:07 PM, Saagar Jha via swift-users < swift-users@swift.org> wrote: > > Saagar Jha > > On Dec 17, 2017, at 22:24, Nevin Brackett-Rozinsky via swift-users < > swift-users@swift.org> wrote: > > …well that was more complicated than I

[swift-users] I've found a serious Bug in JSON encoding (SR-6631) and would like to fix it. [Sorry for the multiple posts]

2017-12-18 Thread Benoit Pereira da silva via swift-users
Dear all I've found a serious Bug in the JSON encoding foundations. [ SR-6631 ] This bug cause JSON encoding issues on Doubles when using a locale that does not use dot as decimal separator e.g « fr_FR » (we use a coma) When using such a locale

Re: [swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread David Hart via swift-users
Hello! Thanks for noticing a bug and taking the time to fix it :) Here are the steps for contributing: Fork the project (you’ve already done that). Clone the fork to your computer. Branch off master and name the branch after the fix (I like to name them with the sr number). Write the fix and

Re: [swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread Jon Shier via swift-users
I’m pretty sure JSON isn’t localized, so this isn’t a bug. Using anything but a . as a decimal separator isn’t valid JSON. Jon > On Dec 18, 2017, at 11:51 AM, Benoit Pereira da silva via swift-users > wrote: > > Dear all > > I've found a serious Bug in JSONEncoder

Re: [swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread Jordan Rose via swift-users
(moving to more relevant list) > On Dec 18, 2017, at 08:51, Benoit Pereira da silva via swift-users > wrote: > > Dear all > > I've found a serious Bug in JSONEncoder SR-6131 > and would like to fix it. > This bug cause JSON

Re: [swift-users] I ve found a serious Bug in JSONEncoder (SR-6131) and would like to fix it.

2017-12-18 Thread Greg Parker via swift-users
Jon is correct: JSON uses '.' as the decimal separator. Benoit is also correct: the bug is that JSONEncoder is incorrectly writing ',' as the decimal separator when the locale is set to fr_FR. Further discussion will be on the swift-corelibs-dev list. > On Dec 18, 2017, at 10:08 AM, Jon Shier

Re: [swift-users] [swift-dev] Make offset index available for String

2017-12-18 Thread Cao, Jiannan via swift-users
OK, but how do you use IndexingIterator to get element and not change itself? In C++, the iterator is more like index. because it could be used to get the element, and not change itself, and it can be offset back and forth not only by one. *it *(it+5) *(it-5) but in