Grammatica 1.4 sources corrupt?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Grammatica 1.4 sources corrupt?

Karl Weber
Hi,

I got the sources 1.4 of grammatica and tried to compile it. It failed with
the following error message:
   
[javac] ...../grammatica-1.4/test/src/java/net/percederberg/grammatica/parser/re/TestRegExp.java:56:
warning: unmappable character for encoding UTF8
[javac]         "�����������������������������������������������";

The source itself looks like

   /**
     * A set of normal characters from ISO-8859-1 .
     */
    private static final String LATIN_1_CHARACTERS =
        "�����������������������������������������������";
   
    /**
     * A set of symbol characters from ISO-8859-1 .
     */
    private static final String LATIN_1_SYMBOLS =
        "�!#�%&/=`'�@�~-_,:;�ޮ�߫��������";

My environment is linux, eclipse 3.3.1.1 and java 1.6

-Karl.

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Grammatica 1.4 sources corrupt?

Karl Weber
Am Samstag, 5. April 2008 22:56 schrieb Karl Weber:
> Hi,
>
> I got the sources 1.4 of grammatica and tried to compile it. It failed with
> the following error message:
>    
> [javac]
> ...../grammatica-1.4/test/src/java/net/percederberg/grammatica/parser/re/Te
>stRegExp.java:56: warning: unmappable character for encoding UTF8
> [javac]         "�����������������������������������������������";

Well, I finally managed to compile grammatica. The following modifications had
to be made:

(1) The file

TestRegExp.java

is not properly encoded. I had to properly encode it using

mv TestRegExp.java TestRegExp.java.old

and

iconv --from-code=ISO-8859-1 --to-code=UTF-8 TestRegExp.java.old >
TestRegExp.java

with bash (note, I am using linux).

(2) I have nothing to do with C#. So, I had to remove a couple of things, that
require C#:

(2.1)  I had to remove the dependency of the target test on test-csharp.

(2.2) I had to remove the dependency of the target doc on doc-csharp.

(3) Altough I am using eclipse, which has junit built-in, it could not be
found.

(3.1) I had to add junit explicitly to the classpath of ant. (o.k.)

(3.2) Even though I added junit as library to the eclipse project _and_ to the
classpath of ant, I still got the error

doc-java:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package
net.percederberg.grammatica.parser...
  [javadoc] Loading source files for package
net.percederberg.grammatica.parser.re...
  [javadoc] Constructing Javadoc information...
  [javadoc] Standard Doclet version 1.6.0
  [javadoc] Building tree for all the packages and classes...
  [javadoc] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
junit.framework.TestCase not found
  [javadoc] Building index for all the packages and classes...
  [javadoc] Building index for all classes...

As far as I can tell, the build.xml is always building the java _and_ the C#
version, no matter what. This does not seem to be a good idea for people not
having C# on there system.

-Karl


_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users
Reply | Threaded
Open this post in threaded view
|

Re: Grammatica 1.4 sources corrupt?

Per Cederberg
Thanks for taking the time to investigate the Grammatica build.xml. It
is the way it is since that is the way I use it, and everybody else
seems satisfied with the prebuilt releases. Also, the C# parts are
built with Mono so it could be seen as a dependency of Grammatica to
have both JDK, Mono, JUnit and Ant installed.

Either way, I would accept clean patches for build.xml that
modularizes the C# build if that is an issue for you.

Regarding the compile error, the test code for Grammatica is
ISO-8859-1. It is not directly an error, since javac uses the default
encoding for your system when compiling. Of course, it would be better
to use Unicode escapes. But again, it works for me and noone else has
expressed interest in compiling the test code.

Regarding the dependencies, I guess one could throw in junit.jar there
due to Eclipses poor support for exporting the version it already got
installed.

Cheers,

/Per

On Sun, Apr 6, 2008 at 12:11 AM, Karl Weber <[hidden email]> wrote:

> Am Samstag, 5. April 2008 22:56 schrieb Karl Weber:
>
> > Hi,
>  >
>  > I got the sources 1.4 of grammatica and tried to compile it. It failed with
>  > the following error message:
>  >
>  > [javac]
>  > ...../grammatica-1.4/test/src/java/net/percederberg/grammatica/parser/re/Te
>  >stRegExp.java:56: warning: unmappable character for encoding UTF8
>  > [javac]         "�����������������������������������������������";
>
>  Well, I finally managed to compile grammatica. The following modifications had
>  to be made:
>
>  (1) The file
>
>  TestRegExp.java
>
>  is not properly encoded. I had to properly encode it using
>
>  mv TestRegExp.java TestRegExp.java.old
>
>  and
>
>  iconv --from-code=ISO-8859-1 --to-code=UTF-8 TestRegExp.java.old >
>  TestRegExp.java
>
>  with bash (note, I am using linux).
>
>  (2) I have nothing to do with C#. So, I had to remove a couple of things, that
>  require C#:
>
>  (2.1)  I had to remove the dependency of the target test on test-csharp.
>
>  (2.2) I had to remove the dependency of the target doc on doc-csharp.
>
>  (3) Altough I am using eclipse, which has junit built-in, it could not be
>  found.
>
>  (3.1) I had to add junit explicitly to the classpath of ant. (o.k.)
>
>  (3.2) Even though I added junit as library to the eclipse project _and_ to the
>  classpath of ant, I still got the error
>
>  doc-java:
>   [javadoc] Generating Javadoc
>   [javadoc] Javadoc execution
>   [javadoc] Loading source files for package
>  net.percederberg.grammatica.parser...
>   [javadoc] Loading source files for package
>  net.percederberg.grammatica.parser.re...
>   [javadoc] Constructing Javadoc information...
>   [javadoc] Standard Doclet version 1.6.0
>   [javadoc] Building tree for all the packages and classes...
>   [javadoc] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
>  junit.framework.TestCase not found
>   [javadoc] Building index for all the packages and classes...
>   [javadoc] Building index for all classes...
>
>  As far as I can tell, the build.xml is always building the java _and_ the C#
>  version, no matter what. This does not seem to be a good idea for people not
>  having C# on there system.
>
>  -Karl
>
>
>  _______________________________________________
>  Grammatica-users mailing list
>  [hidden email]
>  http://lists.nongnu.org/mailman/listinfo/grammatica-users
>

_______________________________________________
Grammatica-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/grammatica-users