FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-13-2008, 04:47 PM
Colin Paul Adams
 
Default how to convert text file with unknown 16 bit encoding to 8 bi t as cii

>>>>> "Pete" == Lancashire, Pete <plancashire@ci.portland.or.us> writes:

Pete> ok 7 BIT :-), in my frustration should have said single
Pete> byte ... well I did it with a perl hack i.e. skip the first
Pete> 2 bytes and send to stdout every other byte...

So you are assuming UTF-16BE (or LE if it's the odd numbered bytes you
are sending), and that every odd (or even) byte is zero.

In that case you could just use iconv with the (assumed) encoding
specified (UTF-16 - iconv will read the BOM and get the endianess
right) , and you should get a decent error message if your
assumption is wrong.
--
Colin Adams
Preston Lancashire

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 12:49 PM.

VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org