title: Decode a string in Swift
body: <p>How can I decode a string in swift? The string is now <code>test%2Enl</code>, but the correct format is <code>test.nl</code>.</p>
  
  <p>I now have this:</p>
  
  <pre><code> let encodedData = encodedString.dataUsingEncoding(NSUTF16StringEncoding)!
   let attributedOptions = [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType]
   let attributedString = NSAttributedString(data: encodedData, options: attributedOptions, documentAttributes: nil, error: nil)!
  
   return attributedString.string     
  </code></pre>