src/Pure/System/standard_system.scala
changeset 38264 205b74a1bb18
parent 36193 067a01827fca
child 39522 01aade784da9
equal deleted inserted replaced
38263:11c2b8d1fde0 38264:205b74a1bb18
    17 import scala.collection.mutable
    17 import scala.collection.mutable
    18 
    18 
    19 
    19 
    20 object Standard_System
    20 object Standard_System
    21 {
    21 {
       
    22   /* UTF-8 charset */
       
    23 
    22   val charset = "UTF-8"
    24   val charset = "UTF-8"
    23   def codec(): Codec = Codec(charset)
    25   def codec(): Codec = Codec(charset)
       
    26 
       
    27   def string_bytes(s: String): Array[Byte] = s.getBytes(charset)
    24 
    28 
    25 
    29 
    26   /* permissive UTF-8 decoding */
    30   /* permissive UTF-8 decoding */
    27 
    31 
    28   // see also http://en.wikipedia.org/wiki/UTF-8#Description
    32   // see also http://en.wikipedia.org/wiki/UTF-8#Description