djcrankypants / spock

Automatically exported from code.google.com/p/spock
0 stars 0 forks source link

"Invalid byte 2 of 3-byte UTF-8 sequence" when resolving Grails Spock plugin #259

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
grails 2.04
spock dependency

Invalid byte 2 of 3-byte UTF-8 sequence

Affected OS:  Mac OS X Lion 10.7.4 (bash / zsh) and Windows

https://gist.github.com/cfbb54398b016b6807b4
(here is old stacktrace because there is also one error related to java 7 
version) 

GRAILS_HOME='/usr/local/Cellar/grails/2.0.4/libexec'
GRAILS_OPTS='-Xmx1G -Xms256m -XX:MaxPermSize=256m'
GREP_OPTIONS='--color=auto'
JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
JAVA_OPTS=' -Dfile.encoding=UTF8 '

I am using Homebrew. 

What version of Spock and Groovy are you using?
Newest.

Other people in my project also are encountering this bug.

IDE: IntelliJ IDEA 11, Eclipse (newest)

Original issue reported on code.google.com by wasielew...@gmail.com on 5 Jul 2012 at 3:53

GoogleCodeExporter commented 8 years ago
When did the problem first appear? Can you show the relevant parts of your 
BuildConfig.groovy? Are you using a release or snapshot version of the Grails 
Spock plugin? Can you run with --stacktrace or some debug mode that provides 
more information? Could this be a problem with you Grails environment/build?

Original comment by pnied...@gmail.com on 5 Jul 2012 at 4:01

GoogleCodeExporter commented 8 years ago
https://gist.github.com/d837fd4c890900b636fb

Nothing special in build as you see.

https://gist.github.com/0ea350e0eb40fea8ae31

After a lot of configurations a have running version but only this plugin is 
affected so I assume it should be fixed

Original comment by wasielew...@gmail.com on 6 Jul 2012 at 1:06

GoogleCodeExporter commented 8 years ago
Also I found some bug related to UTF-8 on grails jira 
http://jira.grails.org/browse/GRAILS-5748

Original comment by wasielew...@gmail.com on 6 Jul 2012 at 1:08

GoogleCodeExporter commented 8 years ago
> After a lot of configurations a have running version but only this plugin is 
affected so I assume it should be fixed

So what exactly did you do to "have a running version"?

Original comment by pnied...@gmail.com on 6 Jul 2012 at 1:12

GoogleCodeExporter commented 8 years ago

Original comment by pnied...@gmail.com on 6 Jul 2012 at 1:13

GoogleCodeExporter commented 8 years ago
I used http://j.mp/LsrRFe this and done a lot of workaround from google so I 
can't tell you but I remember that there was a plugin with the same problem and 
it was fixed by releasing new version. So it is a point to look...

Original comment by wasielew...@gmail.com on 6 Jul 2012 at 1:24

GoogleCodeExporter commented 8 years ago
Which plugin?

Original comment by pnied...@gmail.com on 6 Jul 2012 at 1:26

GoogleCodeExporter commented 8 years ago
Good question :)  please check the UTF-8 BOM in xml files... i think it will 
fix the problem

Original comment by wasielew...@gmail.com on 6 Jul 2012 at 1:28

GoogleCodeExporter commented 8 years ago
➜  ~  locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
➜  ~  

After 

➜  ~  locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
➜  ~  

just type:
export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8" 

Original comment by wasielew...@gmail.com on 6 Jul 2012 at 9:04

GoogleCodeExporter commented 8 years ago
Hi,

I can't reproduce this. 

In your stacktrace it also appeared to have happened for the fields plugin. I 
think this is an environmental issue, and not specific to the Spock plugin.

If you think it is, please provide a build that exhibits the problem.

Original comment by lda...@gmail.com on 20 Jul 2012 at 10:02