Question

I have a git repo project in eclipse which I have been documenting using doxygen (v1.8.4). If I run the latex make ion a fresh clone of the project it runs fine and the PDF is made. However, if I then run a doxy build, which completes OK, then attempt to run the latex make, it fails for

! Package inputenc Error: Keyboard character used is undefined 
(inputenc)                in inputencoding `utf8'. 

See the inputenc package documentation for explanation. 
Type  H <return>  for immediate help. 
 ... 

I have tried switching the encoding of the doxyfile by setting DOXYFILE_ENCODING to ISO-8859-1 with no change in the result... How can I fix this?? Thanks.

EDIT: I have used no non-UTF-8 chars as far as I know in my files, the file referenced before the error is very short and definitely doesn't have non-UTF-8 chars in it. I've even tried clearing my latex output dir and building from scratch with no luck...

EDIT: Irealised that the doxy build only appears to run correctly. It doesnt show any errors, but it should, for example run DOT and build about 10 graphs. The console output says Running dot, but it doesn't say generating graph (n/x) like it should when it actually makes the graphs...

Was it helpful?

Solution

Short answer: So by a slow process of elimination I found that this was caused by a single apostrophe in a file that had appeared to be already built and made without error!!

Long answer: Firstly I used used the project properties to flip the encoding from the default Cp1252 to UTF-8. Then I started removing files one-by-one until rebuilding and remaking after each removal, until the make ran successfully. I re-added all files, but deleted the content in the most recently removed file and tested the make - to confirm it was this file and only this file that caused the issue. the make ran fine. So I pasted the content back into the empty file, and started deleting smaller and smaller sections of the file, again rebuilding and remaking each time until I was left with a good make without the apostrophe and a bad one with it... I simply retyped the apostrophe (as this would then force it to be a UTF-8 char) and success!! Such an annoying bug!

OTHER TIPS

Dude you made it a hard way. Why not use python to do the work for you:

f = open(fn,"rb")
data = f.read()
f.close()
for i in range(len(data)):
    ch = data[i]
    if(ch > 0x7F): # non ASCII character
        print("char: %c, idx: %d, file: %s"%(ch,i,fn))
        str2 = str(data[i-30:i+30])#.decode("utf-8")
        print("txt: %s" % (str2))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top