Skip to content

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented May 25, 2016

  • Explanation: String.decodeCSstring method was introduced while we were reviewing the Standard Library and applying the new API naming guidelines to it, and it's implementation has always contained this bug.
  • Scope of Issue: This method did not exist before Swift 3, so nobody has had a chance to use it yet.
  • Origination: Bug in the original implementation.
  • Risk: None.
  • Reviewed By: Dmitri Gribenko ([stdlib] Fix the String.decodeCString for UTF16 and UTF32 #2681)
  • Testing: Unit tests included in the patch itself + ran the whole test suite.
  • Directions for QA: N/A

rdar://problem/26423201

Resolves [SR-1578](https://bugs.swift.org/browse/SR-1578]
Essentially the problem was that `strlen` is not the right way of
obtaining a length of anything but null-terminated UTF-8 sequence of
characters. Other encodings require alternative mechanisms.
@moiseev moiseev added this to the Swift 3.0 Preview 1 milestone May 25, 2016
@moiseev
Copy link
Contributor Author

moiseev commented May 25, 2016

@swift-ci Please test

@tkremenek tkremenek merged commit 23ba0ee into swiftlang:swift-3.0-preview-1-branch May 26, 2016
@moiseev moiseev deleted the decode-cstring-ccc branch May 26, 2016 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants