<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div>Hello!</div><div><br class=""></div><div>Thanks for noticing a bug and taking the time to fix it :) Here are the steps for contributing:</div><div><br class=""></div><div><ol class="MailOutline"><li class="">Fork the project (you’ve already done that).</li><li class="">Clone the fork to your computer.</li><li class="">Branch off master and name the branch after the fix (I like to name them with the sr number).</li><li class="">Write the fix and the test that validates it (<a href="https://github.com/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md" class="">i</a>f you’re looking for help here, you can read this documentation from the corelibs foundation repo:&nbsp;<a href="https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md" class="">https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/GettingStarted.md</a>)</li><li class="">Push your branch to the remote.</li><li class="">On GitHub, open a Pull Request and wait for somebody to look into it.</li></ol><div class=""><br class=""></div><div class="">If anybody notices that I’ve forgotten a step, please let me know. Meanwhile, if you need any help Benoit, I’m available to chat (in French or English) on the SwiftPM Slack at&nbsp;<a href="https://swift-package-manager.herokuapp.com" class="">https://swift-package-manager.herokuapp.com</a></div><div class=""><br class=""></div><div class="">Regards,</div><div class="">David Hart.</div></div><div><br class=""><blockquote type="cite" class=""><div class="">On 18 Dec 2017, at 11:34, Benoit Pereira da silva via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Dear all</div><div class=""><br class=""></div><div class="">I've found a serious Bug in&nbsp;<a href="https://bugs.swift.org/browse/SR-6631" class="">JSONEncoder SR-6131</a>&nbsp;and would like to fix it.</div><div class="">This bug cause JSON encoding issues on Double when using a local that does not use dot as decimal separator e.g «&nbsp;fr_FR&nbsp;» (we use a coma)</div><div class=""><br class=""></div><div class="">Demonstration of the issue :&nbsp;</div><div class=""><br class=""></div><div class=""><pre class="code-java" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; color: rgb(51, 51, 51); font-size: 11px;"><span class="code-keyword" style="color: rgb(0, 0, 145);">import</span> Foundation

<span class="code-comment" style="color: rgb(128, 128, 128);">// Required to call setLocale
</span><span class="code-keyword" style="color: rgb(0, 0, 145);">import</span> Darwin

<span class="code-comment" style="color: rgb(128, 128, 128);">// Let's set to french
</span>setlocale(LC_ALL,<span class="code-quote" style="color: rgb(0, 145, 0);">"fr_FR"</span>)
&nbsp;
struct Shot:Codable{
&nbsp; &nbsp; let seconds:<span class="code-object" style="color: rgb(145, 0, 145);">Double</span>
}
&nbsp;
let shot = Shot(seconds: 1.1)
&nbsp;
<span class="code-keyword" style="color: rgb(0, 0, 145);">do</span>{
&nbsp; &nbsp; let data = <span class="code-keyword" style="color: rgb(0, 0, 145);">try</span> JSONEncoder().encode(shot)
&nbsp; &nbsp; <span class="code-keyword" style="color: rgb(0, 0, 145);">if</span> let json =&nbsp; <span class="code-object" style="color: rgb(145, 0, 145);">String</span>(data:data, encoding:.utf8){
&nbsp; &nbsp; &nbsp; &nbsp; <span class="code-comment" style="color: rgb(128, 128, 128);">// the result is : <span class="code-quote">"{"</span>seconds<span class="code-quote">":1,1000000000000001}&nbsp;»</span></span></pre><pre class="code-java" style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; color: rgb(51, 51, 51); font-size: 11px;"><span class="code-comment" style="color: rgb(128, 128, 128);"><span class="Apple-tab-span" style="white-space:pre">        </span>// should be : <span class="code-quote">"{"</span>seconds<span class="code-quote">":1.1000000000000001}&nbsp;»</span>
</span>&nbsp; &nbsp; &nbsp; &nbsp; <span class="code-comment" style="color: rgb(128, 128, 128);">// The decimal separator should not be <span class="code-quote">","</span> but <span class="code-quote">"."</span>
</span>&nbsp; &nbsp; &nbsp; &nbsp; print(json)
&nbsp; &nbsp; }
}<span class="code-keyword" style="color: rgb(0, 0, 145);">catch</span>{
&nbsp; &nbsp; print(<span class="code-quote" style="color: rgb(0, 145, 0);">"\(error)"</span>)
}
&nbsp;
exit(EX_OK)</pre><div class=""><br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I would like to propose my fix, test it and, but i’m not mastering the contribution mechanism.</div><div class=""><br class=""></div><div class="">Where should i start?&nbsp;</div><div class=""><br class=""></div><div class="">I ve forked&nbsp;<a href="https://github.com/benoit-pereira-da-silva/swift-corelibs-foundation" class="">https://github.com/benoit-pereira-da-silva/swift-corelibs-foundation</a></div><div class="">I have a very simple Unit test that demonstrates the issue.</div><div class=""><br class=""></div><div class="">How can i test my&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div class=""><div class="" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-size: 14px;"><div apple-content-edited="true" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span class="" style="font-size: 12px; line-height: normal; orphans: 2; widows: 2;"><font face="HelveticaNeue-Light" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div class="" style="margin: 0px; line-height: normal;"><div class="" style="margin: 0px; line-height: normal;"><b class="">Benoit Pereira da Silva</b></div><div class="" style="margin: 0px; line-height: normal;">Ultra Mobile Developer &amp; Movement Activist</div><div class="" style="margin: 0px; line-height: normal;">Développeur Ultra Mobile &amp; Militant du mouvement</div><div class="" style="margin: 0px; line-height: normal;"><a href="https://pereira-da-silva.com/" class="">https://pereira-da-silva.com</a></div><div class="" style="margin: 0px; line-height: normal;"><span class="" style="line-height: normal;"></span></div></div></div><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><span class=""></span></div></font></span></div></div></div></div></div></div><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><br class="Apple-interchange-newline" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;"><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><span id="cid:E3AF4CA8-D774-47D1-AF27-2B086409AEED@home">&lt;bannerp.jpg&gt;</span><div class="" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;"><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><br class="Apple-interchange-newline"><br class="Apple-interchange-newline"><br class=""></span></span></div><div class="" style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;"><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal;" class=""><div class="" style="font-family: HelveticaNeue-Light; orphans: 2; widows: 2;"><div class=""><span class="" style="background-color: rgb(255, 255, 255);">✄&nbsp;--------------------------------</span><br class=""><font size="1" class="">This e-mail is confidential. Distribution, copy, publication or use of this information for any purpose is prohibited without agreement of the sender.<br class="">Ce message est confidentiel. Toute distribution, copie, publication ou usage des informations contenues dans ce message sont interdits sans agrément préalable&nbsp;de l’expéditeur.</font></div><div class=""><font size="1" class=""><br class=""></font></div><div class=""><br class=""></div></div></span></span></div></span></span></div></div>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></body></html>