On Wed, Feb 3, 2010 at 1:54 AM, Timothy Perrett <[email protected]>wrote:
> Do not use the 2.8 port of Lift yet... its mostly broken. Please use 2.7.7 > until the official 2.8 release is out. > Although this is the kind of bug we want to find. For production sites, I would strongly recommend sicking with 2.7.7 If you are skilled with Scala and want to try Lift and 2.8, I encourage you to do so. This is the kind of corner-case that we want to find during testing. > > Cheers, Tim > > On 3 Feb 2010, at 02:00, pomu0325 wrote: > > > Hi, I'm quite a newbie to Lift. I'm now trying to port my first Lift > > application from Lift1.0.2 to latest Lift2.0-scala280, and faced a > > problem relating to source encoding. > > > > I managed to merge pom.xml and some codes on Boot.scala, and succeeded > > to build my application, but when I access to it from browser, it > > displays: > > > > Message: java.nio.charset.UnmappableCharacterException: Input length = > > 2 > > java.nio.charset.CoderResult.throwException(CoderResult.java:261) > > sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:319) > > sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) > > java.io.InputStreamReader.read(InputStreamReader.java:167) > > java.io.BufferedReader.fill(BufferedReader.java:136) > > java.io.BufferedReader.read(BufferedReader.java:157) > > scala.io.BufferedSource$$anonfun$1$$anonfun$apply$1.apply > > (BufferedSource.scala:29) > > scala.io.BufferedSource$$anonfun$1$$anonfun$apply$1.apply > > (BufferedSource.scala:29) > > scala.io.Codec.wrap(Codec.scala:65) > > scala.io.BufferedSource$$anonfun$1.apply(BufferedSource.scala:29) > > scala.io.BufferedSource$$anonfun$1.apply(BufferedSource.scala:29) > > scala.collection.Iterator$$anon$13.next(Iterator.scala:145) > > scala.collection.Iterator$$anon$24.hasNext(Iterator.scala:435) > > scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:326) > > scala.io.Source.hasNext(Source.scala:209) > > net.liftweb.util.PCDataXmlParser$$anonfun$apply$2$$anonfun$apply > > $4.apply(PCDataMarkupParser.scala:184) > > > > ... and more > > > > I traced Lift source and found out that "Codec" argument is not > > passed to Source.fromInputStream(in) at PCDataMarkupParser.scala(l. > > 182). "Codec" api seems to be introduced newly in Scala 2.8, and > > Source.fromInputStream() uses Codec.default as a implicit argument. > > > > My problem here, is I'm using utf-8 for write *.html templates, but > > my Codec.default is "MS932"(Japanese characterset in Windows), so > > failing to decode my template files. I looked through Scala lib > > source, and found out Codec.default it is actually an alias to > > java.lang.Charset.getDefault(), so I just set -Djava.encoding=utf-8 to > > MVN_OPTS and solved the problem, but considering deployment, I don't > > think it's a smart way. > > > > BTW, I confirmed this does not occur on Lift2.0-scala2.7.7. I think > > default source encoding should be somehow configurable in Lift to > > achieve portability. > > > > Kind regards, > > > > Pomu TAKEUCHI > > > > -- > > You received this message because you are subscribed to the Google Groups > "Lift" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
