Re: [greenstone-users] encoding problem under linux

From jens wille
DateMon, 03 May 2004 20:13:08 +0200
Subject Re: [greenstone-users] encoding problem under linux
In-Reply-To (20040503074030-GB27565-puriri-cs-waikato-ac-nz)
hi,

John R. McPherson wrote:
> That sounds like a different problem.
>
> You can use the "iconv" program on linux to change the encoding of a file.
that's what i did - and it kind of worked - but the posting by rene
schrama gives a much simpler (and faster) way.

> But I often also use it for testing if a file is utf-8 or not by
> converting "from" utf-8 "to" utf-8. (The conversion will fail if either
> a character is read that isn't valid in the given encoding, or it can't
> be converted to a character in the destination encoding).
>
> Eg
> $ iconv -f utf-8 -t utf-8 metadata.xml > /dev/null
>
> If it doesn't complain, then the file is valid utf-8. Otherwise it will
> say something like:
>
> iconv: illegal input sequence at position 11
this looks interesting and i'll keep that in mind, thank you.

jens wille