Re: [Rest2web-develop] (pretty strange) encoding error with rest2web on a Mac
Brought to you by:
mjfoord
From: G. M. <mi...@us...> - 2008-12-03 07:55:24
|
On 2.12.08, Benoit wrote: > I've created a single new file, using vim or textwrangler on MacOSX. ... > - I've converted the exactly same file with iconv(1). > iconv -f latin1 -t utf8 myfile.txt > myfile.txt.utf8 > mv myfile.txt.utf8 myfile.txt ... > - Second attempt, I fix the restindex: > encoding: utf-8 > output-encoding: utf-8 > => results: rest2web stops with an encoding related error message. ... > [err] error_details)) > [err] UnicodeError: Unable to decode input data. Tried the following > encodings: 'utf-8'. > [err] (UnicodeDecodeError: 'utf8' codec can't decode bytes in position > 1665-1666: invalid data) > [err] There seems to be still an invalid character in your file. This might be a bug in iconv. Or some non-utf8 encoded char "smuggled" in or a byte was taken out after the conversion. May be you can trim down your example file (keeping the bytes around 1665). Do you get the same error with `rst2html myfile.txt`? Can you open this file with an UTF-8 enabled text editor? What does myfil.txt look like in a web browser if you set the page-encoding manually to UTF-8? In any way, we need an example file to investigate. Günter |