From d7cc1621327e092edf59a394b10c106e4312957c Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Wed, 29 Jun 2011 10:30:44 +0000 Subject: 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. --- src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala | 4 ++-- 1 file 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 13dba172db..390342cc06 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) } } -- cgit v1.2.3