You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Angeshwar Deepak <an...@yahoo.com> on 2004/07/25 17:50:32 UTC

BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Hi,

I am not sure if I should pose this question here.
I have a java file which I have converted to html
using java2html tool. I have to include this html to
my forrest project site.

I tried to rename the .html as .ehtml and put that in
the content/xdocs dir so that a new html file will be
generated by the stylesheets of forrest.

(I did similar to the one shown by Mr.Kyle Downey in 
Onjava article on forrest)(he creates a file called
article.ehtml)

The only difference is that I dont write a .ehtml
file, but rename the html as ehtml.
But I got the error

X [0]                       test\test.html     
BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.

The problem should be with the html file. So I used
Tidy.jar to make the html file well formed and then
rename it to .ehtml. I do all these in ant build on
the fly but again I get the same error.

Where does the problem lie? Or is my approch to
generate the html file for the project completely
wrong?

Or is something wrong in my ant build process.

bye,
with regards,
Deepak.



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Juan Jose Pablos <ch...@che-che.com>.
Angeshwar Deepak escribió:
> 
> Where does the problem lie? Or is my approch to
> generate the html file for the project completely
> wrong?

We need to see this file to diagnose something about it. Please forward 
to us.

Cheers,
Cheche


Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Thorbjørn Ravn Andersen <no...@c.dk>.
Angeshwar Deepak wrote:

>X [0]                       test\test.html     
>BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.
>  
>
This looks like that your generated XML-file does not have the correct 
encoding-attribute in the <?xml?> line.

-- 
  Thorbjoern Ravn Andersen      "...plus...Tubular Bells!"


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Dave Brondsema <da...@brondsema.net>.
In my $ANT_HOME/etc directory there are .xsl files (stylesheets) which
convert (for example) a PMD XML report to a Forrest xml document.  It is
much better to use a forrest xml document than a .ihtml document in
forrest.  So you can convert it to a forrest document instead of a .ihtml
document.

All .xml files in your src/documentation/content/xdocs directory are
validated when forrest runs.  ihtml files are not.  Including tidy in
forrest to clean/validate ithml might be a good idea for the future

On Wed, 28 Jul 2004, Angeshwar Deepak wrote:

> Hi,
>
> Can you please clarify me abt this xsl files you
> referred to? To my understanding - my xml files are
> checked if they are valid or not. If they are found to
> be not valid then an error is thrown like(Invalid byte
> 1 of 1-byte UTF-8 sequence)etc.
>
> So dont you think a better solution would be to add
> the tidy.jar or any tool that automatically corrects
> our xml, html, ehtml or ihtml that we feed to forrest.
> or does such a correction tool already exist in
> forrest by default?
>
> bye,
> with regards,
> Deepak.
>
> --- Nicola Ken Barozzi <ni...@apache.org> wrote:
> > Dave Brondsema wrote:
> >
> > > The better solution would be to use stylesheets to
> > transform the xml
> > > reports to Forrest documents.  $ANT_HOME/etc
> > should have
> > > checkstyle2document.xsl and pmd2document.xsl.  I
> > use this as a
> > > pre-processing step, but you can also configure
> > forrest to use the
> > > different report formats directly.  See
> > >
> >
> http://forrest.apache.org/docs/your-project.html#adding_new_content_type
> >
> > Actually, if you send in a patch with the xsl files
> > to transform these
> > in documentDTD formats, I'll be happy to add them to
> > Forrest.
> >
> > --
> > Nicola Ken Barozzi
> > nicolaken@apache.org
> >              - verba volant, scripta manent -
> >     (discussions get forgotten, just code remains)
> >
> ---------------------------------------------------------------------
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
>

-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org

Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Angeshwar Deepak <an...@yahoo.com>.
Hi,

Can you please clarify me abt this xsl files you
referred to? To my understanding - my xml files are
checked if they are valid or not. If they are found to
be not valid then an error is thrown like(Invalid byte
1 of 1-byte UTF-8 sequence)etc.

So dont you think a better solution would be to add
the tidy.jar or any tool that automatically corrects
our xml, html, ehtml or ihtml that we feed to forrest.
or does such a correction tool already exist in
forrest by default?

bye,
with regards,
Deepak.

--- Nicola Ken Barozzi <ni...@apache.org> wrote:
> Dave Brondsema wrote:
> 
> > The better solution would be to use stylesheets to
> transform the xml
> > reports to Forrest documents.  $ANT_HOME/etc
> should have
> > checkstyle2document.xsl and pmd2document.xsl.  I
> use this as a
> > pre-processing step, but you can also configure
> forrest to use the
> > different report formats directly.  See
> >
>
http://forrest.apache.org/docs/your-project.html#adding_new_content_type
> 
> Actually, if you send in a patch with the xsl files
> to transform these 
> in documentDTD formats, I'll be happy to add them to
> Forrest.
> 
> -- 
> Nicola Ken Barozzi                  
> nicolaken@apache.org
>              - verba volant, scripta manent -
>     (discussions get forgotten, just code remains)
>
---------------------------------------------------------------------
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Dave Brondsema wrote:

> The better solution would be to use stylesheets to transform the xml
> reports to Forrest documents.  $ANT_HOME/etc should have
> checkstyle2document.xsl and pmd2document.xsl.  I use this as a
> pre-processing step, but you can also configure forrest to use the
> different report formats directly.  See
> http://forrest.apache.org/docs/your-project.html#adding_new_content_type

Actually, if you send in a patch with the xsl files to transform these 
in documentDTD formats, I'll be happy to add them to Forrest.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Dave Brondsema <da...@brondsema.net>.
The better solution would be to use stylesheets to transform the xml
reports to Forrest documents.  $ANT_HOME/etc should have
checkstyle2document.xsl and pmd2document.xsl.  I use this as a
pre-processing step, but you can also configure forrest to use the
different report formats directly.  See
http://forrest.apache.org/docs/your-project.html#adding_new_content_type

Dave Brondsema

On Mon, 26 Jul 2004, Angeshwar Deepak wrote:

> Hi,
>
> Let me explain the problem more clearly. I have some
> reports in the form of xml files from javadocs,
> findbugs, pmd, junit and jcoverage. I had used my
> stylesheets to convert the xml to html files.
>
> I had simply renamed the html to .ehtml or .ihtml. But
> none of these html files were well formed so I got the
> error. So I used Tidy.jar(from sourceforge) to make
> the html well formed and then do the renmaing. Now
> ther is no error.
>
> But I still have some problem with the tidy tool(i am
> not able to set the config file) but anyway forrest
> runs fine now.
>
> bye,
> with regards,
> Deepak.
>
>
> --- David Crossley <cr...@apache.org> wrote:
> > Angeshwar Deepak wrote:
> > > I have partly solved the problem by using tidy.jar
> > in
> > > ant build and making the html well formed and then
> > > renaming it as .ehtml or .ihtml. it works fine
> > now.
> >
> > Ah, we didn't think to ask whether your sources were
> > valid.
> > Is this something that forrest should ensure? That
> > all of
> > the input docs are at least well-formed.
> >
> > By the way, it is a strange error message. What does
> > it mean?
> >
> > --
> > David Crossley
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>

-- 
Dave Brondsema : dave@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
http://csx.calvin.edu : student org

Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Angeshwar Deepak <an...@yahoo.com>.
Hi,

Let me explain the problem more clearly. I have some
reports in the form of xml files from javadocs,
findbugs, pmd, junit and jcoverage. I had used my
stylesheets to convert the xml to html files.

I had simply renamed the html to .ehtml or .ihtml. But
none of these html files were well formed so I got the
error. So I used Tidy.jar(from sourceforge) to make
the html well formed and then do the renmaing. Now
ther is no error.

But I still have some problem with the tidy tool(i am
not able to set the config file) but anyway forrest
runs fine now.

bye,
with regards,
Deepak.


--- David Crossley <cr...@apache.org> wrote:
> Angeshwar Deepak wrote:
> > I have partly solved the problem by using tidy.jar
> in
> > ant build and making the html well formed and then
> > renaming it as .ehtml or .ihtml. it works fine
> now. 
> 
> Ah, we didn't think to ask whether your sources were
> valid.
> Is this something that forrest should ensure? That
> all of
> the input docs are at least well-formed.
> 
> By the way, it is a strange error message. What does
> it mean?
> 
> -- 
> David Crossley
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by David Crossley <cr...@apache.org>.
Angeshwar Deepak wrote:
> I have partly solved the problem by using tidy.jar in
> ant build and making the html well formed and then
> renaming it as .ehtml or .ihtml. it works fine now. 

Ah, we didn't think to ask whether your sources were valid.
Is this something that forrest should ensure? That all of
the input docs are at least well-formed.

By the way, it is a strange error message. What does it mean?

-- 
David Crossley


Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by Angeshwar Deepak <an...@yahoo.com>.
Hi,

I have partly solved the problem by using tidy.jar in
ant build and making the html well formed and then
renaming it as .ehtml or .ihtml. it works fine now. 

bye,
with regards,
Deepak.



--- David Crossley <cr...@apache.org> wrote:
> Angeshwar Deepak wrote:
> > I am not sure if I should pose this question here.
> > I have a java file which I have converted to html
> > using java2html tool. I have to include this html
> to
> > my forrest project site.
> > 
> > I tried to rename the .html as .ehtml and put that
> in
> > the content/xdocs dir so that a new html file will
> be
> > generated by the stylesheets of forrest.
> 
> The "ehtml" is not used with Forrest anymore.
> 
> You probably want "ihtml" extension. See the notes
>
http://forrest.apache.org/docs/upgrading_06.html#ehtml
> 
> There is one example of our ithml in the demo site
> created by 'forrest seed'. There is another example
>
http://forrest.apache.org/howto/howto-asf-mirror.html
> 
> One note. Make sure that your html file uses H1
> headings,
> as that is what triggers the generation of <section>
> elements.
> 
> --David
> 
> > (I did similar to the one shown by Mr.Kyle Downey
> in 
> > Onjava article on forrest)(he creates a file
> called
> > article.ehtml)
> > 
> > The only difference is that I dont write a .ehtml
> > file, but rename the html as ehtml.
> > But I got the error
> > 
> > X [0]                       test\test.html     
> > BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.
> > 
> > The problem should be with the html file. So I
> used
> > Tidy.jar to make the html file well formed and
> then
> > rename it to .ehtml. I do all these in ant build
> on
> > the fly but again I get the same error.
> > 
> > Where does the problem lie? Or is my approch to
> > generate the html file for the project completely
> > wrong?
> > 
> > Or is something wrong in my ant build process.
> > 
> > bye,
> > with regards,
> > Deepak.
> 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

Re: BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.-Problem

Posted by David Crossley <cr...@apache.org>.
Angeshwar Deepak wrote:
> I am not sure if I should pose this question here.
> I have a java file which I have converted to html
> using java2html tool. I have to include this html to
> my forrest project site.
> 
> I tried to rename the .html as .ehtml and put that in
> the content/xdocs dir so that a new html file will be
> generated by the stylesheets of forrest.

The "ehtml" is not used with Forrest anymore.

You probably want "ihtml" extension. See the notes
http://forrest.apache.org/docs/upgrading_06.html#ehtml

There is one example of our ithml in the demo site
created by 'forrest seed'. There is another example
http://forrest.apache.org/howto/howto-asf-mirror.html

One note. Make sure that your html file uses H1 headings,
as that is what triggers the generation of <section>
elements.

--David

> (I did similar to the one shown by Mr.Kyle Downey in 
> Onjava article on forrest)(he creates a file called
> article.ehtml)
> 
> The only difference is that I dont write a .ehtml
> file, but rename the html as ehtml.
> But I got the error
> 
> X [0]                       test\test.html     
> BROKEN: Invalid byte 1 of 1-byte UTF-8 sequence.
> 
> The problem should be with the html file. So I used
> Tidy.jar to make the html file well formed and then
> rename it to .ehtml. I do all these in ant build on
> the fly but again I get the same error.
> 
> Where does the problem lie? Or is my approch to
> generate the html file for the project completely
> wrong?
> 
> Or is something wrong in my ant build process.
> 
> bye,
> with regards,
> Deepak.