I am trying to read a file to xml with the following code:
import scala.xml._
object HebrewToEnglishCityTranslator {
val data = XML.loadFile("cities_hebrew_utf.xml");
for(val entry <- data \\ "city") {
val hebrewName = (entry \\ "hebrew_name").text
val englishName = (entry \\ "english_name").text
println(hebrewName + "=" + englishName) }
However, my file is encoded in UTF-8 (hebrew chars) and XML encoding is val encoding = "ISO-8859-1"
what should I do?