Error Io Error While Decoding
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more
Io Error While Decoding With Utf-8
about Stack Overflow the company Business Learn more about hiring developers or posting io error while decoding with utf 8 play ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack io error while decoding main.scala with utf-8 Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Scala Play 2.0. Compilation error: IO error while decoding up vote
Please Try Specifying Another One Using The -encoding Option
10 down vote favorite I downloaded multi-module Scala project from GitHub (https://github.com/henrikengstrom/roygbiv), and one of the module is Play 2.0 module. So I can run whole application using SBT's run command on each module, and all works fine. But when I add to Play 2.0 template (index.scala.html) non-English characters and press F5 in browser I get compilation error: IO error while decoding C:\Users...\web\target\scala-2.9.1\src_managed\main\views\html\index.template.scala with UTF-8 Please try specifying another
Scalac Classpath
one using the -encoding option Play 2.0 module I run also using SBT's run command, not using Play console. I checked source file encoding - it is UTF-8. Also tried UTF-8 without BOM. Where can be problem? scala playframework playframework-2.0 sbt multi-module share|improve this question edited Jun 13 '13 at 8:19 asked May 13 '13 at 19:33 MyTitle 2,4702083173 opened second bounty, now 300. –MyTitle Jun 13 '13 at 8:20 add a comment| 5 Answers 5 active oldest votes up vote 3 down vote accepted +300 Your problem seems to be this: your intermediate scala files are not encoded correctly. Here is the process: Play takes your template file (foo.scala.html) and translates this into Scala: target/scala-2.10/src_managed/main/views/html/foo.template.scala. This then gets compiled by sbt to .class files and run by play. When sbt creates these intermediate files, it creates them with the default encoding (in my case a Windows machine so UTF-8 without BOM - your machine may differ). Importantly, this encoding sticks around, so even if I change the encoding of the original template file (foo.scala.html to UTF-16), the encoding of the .scala file is still the same (UTF-8 without BOM in my case). However, the file no longer compiles because the file
Sign in Pricing Blog Support Search GitHub This repository Watch 759 Star 8,475 Fork 2,922 playframework/playframework Code Issues 233 Pull requests 36 Projects 0 Pulse Graphs New issue 2.5.3 “IO error while decoding Routes.scala with UTF-8” when compiling Play Framework project #6147 Closed evandu opened this Issue May 11, 2016 · 4 comments Projects None yet Labels None yet Milestone http://stackoverflow.com/questions/16529753/scala-play-2-0-compilation-error-io-error-while-decoding No milestone Assignees No one assigned 2 participants evandu commented May 11, 2016 In my project, we have some Chinese comments in routes. But when we try to compile the source code, Play throws the following errors [error] IO error while decoding Routes.scala with UTF-8 [error] Please try https://github.com/playframework/playframework/issues/6147 specifying another one using the -encoding option [error] one error found [error] (demo/compile:compileIncremental) Compilation failed [error] Total time: 4 s, completed 2016-5-11 11:00:05 test routes is #优惠包编辑 GET /coupon/promotionCode/edit/:id coupon.PromotionCodeApplication.edit(id:String) after compile, the Routes.scala "GET", """@(优惠管理,优包惠编�?, coupon.group.edit)""", this.prefix + """coupon/group/edit/""" + "$" + """id<[^/]+>""" Play Framework member gmethvin commented May 12, 2016 • edited Hi @evandu, Is the routes file encoded as UTF-8? If so, can you provide a small sample project showing the error? evandu commented May 17, 2016 Hi @gmethvin sample project thanks Play Framework member gmethvin commented May 17, 2016 @evandu I think I know what the problem is. The routes compiler is using the default system encoding, which is what the JVM uses, but you are explicitly setting UTF-8 for just the scala compiler. What you can do is set the environment variable: JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" That will tell Java to use UTF-8 a
scala-tools scala-internals scala-xml scala-sips IRC Channel Blogs & News Sygneca Wiki Scala Jira Language ResearchGrants Papers Talks Theses Courses Presentations In the PressArticles Interviews and Panel Talks News Archive The Scala Team http://www.scala-lang.org/old/search/node/scala-library.jar%3Fpage=12.html Scala's Prehistory Contact Us DocumentationLearning Scala Tour of Scala ManualsA Brief Scala Tutorial Scala by Example Scala Overview Scala Language Specification Scala Improvement Process Translations Scaladoc 2 Manual Books Scala APIscaladoc (stable) scaladoc (nightly) compiler API (nightly) Download locally Setup & Getting StartedGetting Started with Scala Java to Scala Windows Mini-Guide Setting PATH on Windows fsc and the OSX firewall Programming GuidesScala io error Actors Scala on Android Scala on Microsoft .NET Scala on Google App Engine Other GuidesMaven for Beginners Scala and JUnit on Eclipse Scala, Emacs and Yasnippet FAQs Code ExamplesHello world! Simple Snippets Advanced Examples SoftwareDownload ScalaLatest Stable Release Previous Releases Nightly Builds Git Repository Distribution Content IDE and Editor pluginsIDE Plugins Tool Support Libraries and ToolsLibraries Development Tools Program Testing Other Scala-Related Scala io error while License Scala DevelopersDeveloper's GuidesBuild Scala from the Source Writing Compiler Plugins Scala Ant Tasks Compiler Internals Improvement Documents Bug Tracking & TestingScala Bugtracker Scala Jenkins Code Review Codebase ProgressLanguage Changes Download Stats Maintainers Contributor Agreement Home » Search » Search Search Enter your keywords: Advanced search Containing any of the words: Containing the phrase: Containing none of the words: Only in the category(s): Scala LanguageScala UserScala DebateScala ToolsScala InternalsScala XMLGeneralDeploymentProgrammingJava InteroperabilityLimitationsToolsFeatured Only of the type(s): Article FAQ Scala Improvement Document Story Search results serializable anonfun cost: 300K ... -rw-r--r-- 1 paulp admin 4846720 Nov 28 10:54 scala-library.jar 13385526 bytes -rw-r--r-- 1 paulp admin 8303042 Nov ... -rw-r--r-- 1 paulp admin 4768521 Nov 28 10:56 scala-library.jar 13071563 bytes 313K or 2.3% of the jars is going to ... Forum topic - extempore - 2009-11-28, 20:17 - 4 comments scalac and javac ... override val manifestClassPath = Some("scala-library.jar") } The name of the file isn't really relevant. ... override val manifestClassPath = Some("scala-library.jar") } The name of the file isn't really relevant. ... Forum topic - Razvan Cojocaru 2 - 2010-02-10, 03:57 - 8 comments "S