Giter Site home page Giter Site logo

Comments (5)

jvd10 avatar jvd10 commented on September 15, 2024 2

I think that it just means that the file encoding is wrong. On osx:

file --mime-encoding BraceCode.java BraceCode.java: iso-8859-1

Fix with:

iconv -f iso-8859-1 -t utf-8 < BraceCode.java > BraceCode.java

from patentpublicdata.

jindrichmynarz avatar jindrichmynarz commented on September 15, 2024 1

Note that iconv first truncates the output file, so that piping its output to the same path as its input results in an empty file. I'm currently using this script to fix the source code:

#!/usr/bin/env bash

set -eo pipefail
shopt -s failglob

FILES="PatentDocument/src/main/java/gov/uspto/patent/doc/xml/BraceCode.java
PatentDocument/src/main/java/gov/uspto/patent/model/NplCitation.java
PatentDocument/src/main/java/gov/uspto/patent/model/DocumentId.java
PatentDocument/src/main/java/gov/uspto/patent/doc/greenbook/DotCodes.java
PatentDocument/src/main/java/gov/uspto/patent/doc/pap/FormattedText.java
PatentDocument/src/main/java/gov/uspto/patent/doc/sgml/FormattedText.java"

TMPFILE=`mktemp`
for FILE in ${FILES}
do
  iconv -f iso-8859-1 -t utf-8 < ${FILE} > ${TMPFILE} &&
  mv -f ${TMPFILE} ${FILE}
done

# Fix incorrect type signature for constructor
sed -i '' 's/, "<XX>"//g' PatentDocument/src/main/java/gov/uspto/tm/doc/brs/TmBrs.java

from patentpublicdata.

bgfeldm avatar bgfeldm commented on September 15, 2024 1

Sorry about the missing DataUtil java class it's now checked in. My IDE seems to not to be bothered by any character encoding issues, but I will continue to look into it.

from patentpublicdata.

sotnikov-s avatar sotnikov-s commented on September 15, 2024

that was nice, the encoding error got resolved, but another one occurred:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project PatentDocument: Compilation failure: Compilation failure:
[ERROR] PatentPublicData/PatentDocument/src/main/java/gov/uspto/tm/doc/brs/TmBrs.java:[32,29] cannot find symbol
[ERROR]   symbol:   class DateUtil
[ERROR]   location: package gov.uspto.common.text
[ERROR] PatentPublicData/PatentDocument/src/main/java/gov/uspto/tm/doc/brs/TmBrs.java:[228,32] cannot find symbol
[ERROR]   symbol:   variable DateUtil
[ERROR]   location: class gov.uspto.tm.doc.brs.TmBrs

seems like it imports a nonexistent class cause there is no mention of both DateUtil and its called toDateTimeISO method throughout the whole project

from patentpublicdata.

sotnikov-s avatar sotnikov-s commented on September 15, 2024

thanks, with the above-mentioned script and the newest version the build succeeds

from patentpublicdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.