Skip to content

[SR-2956] CharacterSet union and formUnion not working properly in Swift 3 with unicode #4318

Open
@swift-ci

Description

@swift-ci
Previous ID SR-2956
Radar None
Original Reporter thuss (JIRA User)
Type Bug
Status Reopened
Resolution
Environment

Mac OS Sierra 10.12
Xcode 8.0 (8a218a)
Apple Swift version 3.0 (swiftlang-800.0.46.2 clang-800.0.38)
Target: x86_64-apple-macosx10.9

Additional Detail from JIRA
Votes 2
Component/s Foundation
Labels Bug, SDKOverlay
Assignee None
Priority Medium

md5: eea36f50a39958f934a3b2a2adf3ded2

Issue Description:

You can reproduce with the following code: https://gist.github.com/twobitlabs/5ba150aed3c159d215ef049f0c5739de

import Foundation
var charset = CharacterSet(charactersIn: "a")
charset.formUnion(CharacterSet(charactersIn: "\u{1F600}"))
print(charset.contains("\u{1F600}")) // prints false but should print true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions