[sllug-members]: File Upload / Character Set Issues

Will Aoki waoki at waoki.org
Sat Jan 13 12:43:42 MST 2007


On Sat, Jan 13, 2007 at 11:48:45AM -0700, Eric Huber wrote:
[snipped UTF-16 problem]
> Also, using UltraEdit, I ran a Unicode-to-ASCII conversion before I 
> uploaded it using the form in the script, and everything works great, 
> but I'd rather not create an extra step for users, if there is a way to 
> upload and convert on the linux server with my script somehow.

recode UTF-16..UTF-8 thefile.txt

If you want ASCII instead of UTF-8, replace UTF-8 with US-ASCII. UTF-8
and ASCII will yield identical output if you don't have any characters
in the input that can't be represented in ASCII.

On Debian, the recode(1) program is packaged in the conveniently-named
'recode' package.

-- 
William Aoki         waoki at waoki.org              KD7YAF


More information about the sllug-members mailing list