Scalastyle with files include UTF-8 strings

468 views
Skip to first unread message

SEKI Takashi

unread,
Jun 11, 2013, 11:03:59 PM6/11/13
to scalasty...@googlegroups.com
Hello!

I am using Scalastyle from today.
It's pretty good tool for me! Thanks!

I have a question.
Can I use this tool for source files include UTF-8 (Japanese) ?

When I use, Scalastyle said "error file=error.scala message=Input length = 2"

I tried that...
 Add "javaOptions ++= Seq("-Dfile.encoding=UTF-8")" in my build.sbt
But NG ...

Please Help!

I am using..
 Scalastyle 0.3.2
 SBT 0.12.3
 Scala 2.9.3

Regards

Matthew Farwell

unread,
Jun 17, 2013, 4:00:59 AM6/17/13
to scalasty...@googlegroups.com
Yes, this is a good idea. You can specify the file encoding in the maven plugin, but not in the sbt plugin. Could you raise an issue in https://github.com/scalastyle/scalastyle-sbt-plugin/issues?direction=desc&sort=created&state=open

The -Dfile.encoding won't work because we're not forking for Scalastyle.

Thanks.

Matthew Farwell.


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Scalastyle users.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse scalastyle-use...@googlegroups.com.
Pour envoyer un message à ce groupe, adressez un e-mail à scalasty...@googlegroups.com.
Visitez ce groupe à l'adresse http://groups.google.com/group/scalastyle-users?hl=fr .
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 

関隆

unread,
Jun 18, 2013, 7:55:34 AM6/18/13
to scalasty...@googlegroups.com
Hello! Matthew

Thank you very much for your responce!! :)

Today, I found a way for this matter that is to write
"-Dfile.encoding=UTF-8" in the bin/sbtconfig.txt.
It seems good in my case.

This way is a simple and better, I think.

But, maybe old sbt users can' t use this way..?.
Do you think that need to post new issue ?
If you think that need to post new one, I can do later.

Thanks. :)

2013/6/17 Matthew Farwell <mat...@farwell.co.uk>:
> http://groups.google.com/group/scalastyle-users .
>
> Pour plus d'options, visitez le site
> https://groups.google.com/groups/opt_out .
>
>



--
----------------------------------
関 隆(SEKI Takashi)
hawk...@nifty.com
hawk...@gmail.com
hawk...@facebook.com
Skype:takashi.seki

Matthew Farwell

unread,
Jun 18, 2013, 8:43:30 AM6/18/13
to scalasty...@googlegroups.com
It should at least pick a good default encoding. And I should add your trick to the documentation. I'll look at this this week if I have time.

Thanks.

Matthew.


2013/6/18 関隆 <hawk...@gmail.com>

関隆

unread,
Jun 18, 2013, 9:23:27 AM6/18/13
to scalasty...@googlegroups.com
Hi! Matthew

I found!
In OSX, a "-Dfile.encoding" option is has to write in ".sbtopts" or
"/etc/sbt/sbtopts" :-o

Please check it.

Regards

2013/6/18 Matthew Farwell <mat...@farwell.co.uk>:
Reply all
Reply to author
Forward
0 new messages