Strings constructed with an array of Characters are malformed
| Originator: | GriotSpeak | ||
| Number: | rdar://19934299 | Date Originated: | 2015-02-24 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: | Always |
Summary:
Strings with larger unicode scalar characters are malformed.
Steps to Reproduce:
// Playground - noun: a place where people can play
import UIKit
var str = "Hello, playground"
let array:[Character] = [
"\u{1F496}",
"\u{1F496}",
"\u{1F496}"
]
String(array)
let it = "".join(array.map({String($0)}))
println(it)
Expected Results:
A string without the question mark characters
💖💖💖
Actual Results:
�💖💖�
Version:
OS 10.10.2 (14C109)
Xcode Version 6.3 (6D532l)
Notes:
Configuration:
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!