PS: Re: "iconv: illegal input sequence" in VM

Charles G Waldman cgw at alum.mit.edu
Fri Mar 23 13:42:30 EDT 2012



One more detail:  

feeding my INBOX file to iconv in a terminal like this:

 $ iconv -f  utf-8 -t iso-8859-1 ~/Mail/INBOX 

also results in the:

"iconv: illegal input sequence at position xxxx"

so there's really some invalid characters in the input, I'll have to
try to understand how they are getting in there (again, this seems to
happen with mail that people are sending from IPhones).  The actual 
bytes are:  e2 80 a2

I can add the "-c" flag to iconv, which just throws the offending
characters away (I see "sent from iconv" in the message now, just
without the bullet chars).

Some more stuff that would probably make sense if I understood iconv
better:  If I create a test file with just the offending sequence:

$ hexdump -C /tmp/test 
00000000  e2 80 a2 74 65 73 74 0a  0a                       |...test..|

and feed this to iconv in a terminal, I get the following:

cgw at x201~$ iconv /tmp/test 
"test

cgw at x201~$ iconv -f utf8 /tmp/test 
"test

cgw at x201~$ iconv -f utf8 -t iso8859-1 /tmp/test 
iconv: illegal input sequence at position 0

(the double-quote before "test" is displaying correclty as a bullet in
the terminal,but turns into a double-quote when I copy/paste to
XEmacs).

What's going on here?  So many questions :-)   Why does copy/paste
turn a bullet into a double-quote, and why does iconv fail when I
specify iso8859-1 as target codeset?

	Thanks again,
	       
	       -Charles



Julian Bradfield writes:
 > On 2012-03-23, Stephen J. Turnbull <stephen at xemacs.org> wrote:
 > > On Wed, Mar 21, 2012 at 4:49 PM, Charles G Waldman <cgw at alum.mit.edu> wrote:
 > >>  iconv: illegal input sequence at position 161
 > >
 > > This would appear to be a VM issue, as XEmacs itself doesn't use iconv
 > 
 > VM doesn't use iconv, unless you tell it to.
 > Charles - check with no .vm or .emacs .
 > 
 > 
 > 



More information about the XEmacs-Beta mailing list