summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-02-05 10:27:38 +0000
committermichelou <michelou@epfl.ch>2008-02-05 10:27:38 +0000
commit2388b54ba3762e019b35affb81aea67ed92762dd (patch)
tree835c27ab822be77ff503fe4754d905d8bf094703 /src/library
parent87609b42414616a3ec1f0f2f2007f3061fa7f886 (diff)
downloadscala-2388b54ba3762e019b35affb81aea67ed92762dd.tar.gz
scala-2388b54ba3762e019b35affb81aea67ed92762dd.tar.bz2
scala-2388b54ba3762e019b35affb81aea67ed92762dd.zip
updated default encoding to UTF8
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/io/Source.scala8
-rw-r--r--src/library/scala/util/Properties.scala6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/library/scala/io/Source.scala b/src/library/scala/io/Source.scala
index 083e401348..6d4d29307a 100644
--- a/src/library/scala/io/Source.scala
+++ b/src/library/scala/io/Source.scala
@@ -92,8 +92,8 @@ object Source {
* filename.
* @deprecated use fromFile(name, enc) instead.
*/
- @deprecated def fromFile(name: String): Source =
- fromFile(new File(name))
+ def fromFile(name: String): Source =
+ fromFile(name, util.Properties.encodingString)
/** creates Source from file with given name, using given encoding, setting
* its description to filename.
@@ -104,8 +104,8 @@ object Source {
/** creates Source from file with given file: URI
* @deprecated use fromFile(uri, enc) instead.
*/
- @deprecated def fromFile(uri: URI): Source =
- fromFile(new File(uri))
+ def fromFile(uri: URI): Source =
+ fromFile(uri, util.Properties.encodingString)
/** creates Source from file with given file: URI
*/
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index d6e77ffa60..2fa885dc3a 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -1,6 +1,6 @@
/* __ *\
** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2006-2007, LAMP/EPFL **
+** / __/ __// _ | / / / _ | (c) 2006-2008, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/____/_/ | | **
** |/ **
@@ -38,12 +38,12 @@ object Properties {
}
val copyrightString: String = {
- val defaultString = "(c) 2002-2007 LAMP/EPFL"
+ val defaultString = "(c) 2002-2008 LAMP/EPFL"
props.getProperty("copyright.string", defaultString)
}
val encodingString: String = {
- val defaultString = "ISO-8859-1"
+ val defaultString = "UTF8" //"ISO-8859-1"
props.getProperty("file.encoding", defaultString)
}