Re: [Rest2web-develop] (pretty strange) encoding error with rest2web on a Mac
Brought to you by:
mjfoord
From: Ben <bi...@ma...> - 2008-12-03 08:52:12
|
Hello everyone, first of all, thank you for your help and support! I really appreciate it. > There seems to be still an invalid character in your file. Yes, it looks like an invalid character, but there are other clues that it's not - as Michael pointed out, it was a pb in writing the file, apparently, not reading it (encoding vs decoding) - iconv is perfectly happy with all the files - I've asked a python guru friend to write a program to spot any non-utf8 character in any file and his program, is_unicode.py , is perfectly happy with my files, char by char - all the files are perfectly processed by rst2html.py (for i in `ls -1 *.txt` ; do rst2html.py $i > /dev/null ; done) => no error on stderr - it simply perfectly works on Linux. Same files, same rest2web archive. > May be you can trim down your example file (keeping the bytes around 1665). I did, big time! and the files are really utf8 However, do you know how to jump to byte 1665 with any text editor? I've tried with cat, wc, etc. and I simply didn't find it :< sorry. What I did is to remove all the paragraphs except the intro. It fails. > Do you get the same error with `rst2html myfile.txt`? nope, it works. All of them. > > Can you open this file with an UTF-8 enabled text editor? Yes, vim, emacs 22.2.50.1 with utf8 support, and textwrangler with the explicit mention of utf-8 encoding. I carefully inspected the files, I removed any weird character (even those which are supposedly utf8 like blocked semi space or fancy "). > What does myfil.txt look like in a web browser if you set the > page-encoding manually to UTF-8? I've done that with Firefox, explicitely picking UTF-8 in View -> Character encdoing. The rest source page looks great! > > In any way, we need an example file to investigate. > OK, I'm going to create an archive and post a link to it on this list. Thank you again for your help. -- Ben |