title: How to ensure that Strings are in UTF-8?
body: <p>How to convert this String <code>the surveyÂ’s rules</code> to <code>UTF-8</code> in Scala?</p>
  
  <p>I tried these roads but does not work:  </p>
  
  <pre><code>scala&gt; val text = "the surveyÂ’s rules"
  text: String = the surveyÂ’s rules
  
  scala&gt; scala.io.Source.fromBytes(text.getBytes(), "UTF-8").mkString
  res17: String = the surveyÂ’s rules
  
  scala&gt; new String(text.getBytes(),"UTF8")
  res21: String = the surveyÂ’s rules
  </code></pre>
  
  <p>Ok, i'm resolved in this way. Not a converting but a simple reading</p>
  
  <pre><code>implicit val codec = Codec("US-ASCII").onMalformedInput(CodingErrorAction.IGNORE).onUnmappableCharacter(CodingErrorAction.IGNORE)
  
  val src = Source.fromFile(new File (folderDestination + name + ".csv"))
  val src2 = Source.fromFile(new File (folderDestination + name + ".csv"))
  
  val reader = CSVReader.open(src.reader())
  </code></pre>