Dear All,

Philippe Hausler has emitted the hypothesis that 
https://bugs.swift.org/browse/SR-6631 was a bug in Darwin Objc Foundations.
He was right! Shall i close the Swift SR-6631? 

The following Objc Implementation is faulting:

 #import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // Let's set to french
        setlocale(LC_ALL,"fr_FR");
        NSDictionary *dictionary = @{@"decimalValue":@1.1};
        NSError* error = nil;
        NSData* data = [NSJSONSerialization dataWithJSONObject:dictionary 
options:kNilOptions error:&error];
        NSString * json = [[NSString alloc] initWithData:data 
encoding:NSUTF8StringEncoding];
        NSLog(@"%@",json);
    }
    return 0;
}


Result :  2017-12-19 09:08:49.657316+0100 doubleEncodingObjc[2016:82301] 
{"decimalValue":1,1000000000000001}



I’have been updating the relevant radar: 
https://bugreport.apple.com/web/?problemID=36107307



Benoit



Benoit Pereira da Silva
Ultra Mobile Developer & Movement Activist
Développeur Ultra Mobile & Militant du mouvement
https://pereira-da-silva.com <https://pereira-da-silva.com/>





✄ --------------------------------
This e-mail is confidential. Distribution, copy, publication or use of this 
information for any purpose is prohibited without agreement of the sender.
Ce message est confidentiel. Toute distribution, copie, publication ou usage 
des informations contenues dans ce message sont interdits sans agrément 
préalable de l'expéditeur.



_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev
  • [swift-corelibs-dev] That's... Benoit Pereira da silva via swift-corelibs-dev

Reply via email to