summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-29 20:50:04 +0000
committerPaul Phillips <paulp@improving.org>2011-06-29 20:50:04 +0000
commit1320aceafb48d3079bf6c52b1cd15ee015584648 (patch)
tree28f8621f590c13a1f8bfa330fd8d2aa027605aee
parenta2901d5b15ec9615dfd12c64145925019551a531 (diff)
downloadscala-1320aceafb48d3079bf6c52b1cd15ee015584648.tar.gz
scala-1320aceafb48d3079bf6c52b1cd15ee015584648.tar.bz2
scala-1320aceafb48d3079bf6c52b1cd15ee015584648.zip
Use the correct encoding in the browsing loader...
Use the correct encoding in the browsing loader for the presentation compiler. This should be backported to 2.9 and 2.8. no review.
-rw-r--r--src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
index b024d550b7..3594e48323 100644
--- a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
+++ b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
@@ -92,7 +92,7 @@ abstract class BrowsingLoaders extends SymbolLoaders {
}
// System.out.println("Browsing "+src)
- val source = new BatchSourceFile(src)
+ val source = getSourceFile(src) // this uses the current encoding
val body = new OutlineParser(source).parse()
// System.out.println(body)
val browser = new BrowserTraverser
@@ -111,7 +111,7 @@ abstract class BrowsingLoaders extends SymbolLoaders {
browseTopLevel(root, src)
} catch {
case ex: syntaxAnalyzer.MalformedInput =>
- println("caught malformed input exception at offset "+ex.offset+": "+ex.msg)
+ println("[%s] caught malformed input exception at offset %d: %s".format(src, ex.offset, ex.msg))
super.enterToplevelsFromSource(root, name, src)
}
}