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:16 PM
"Lancashire, Pete"
 
Default how to convert text file with unknown 16 bit encoding to 8 bit as cii

how do I convert a file (or output to stdont) with an unknown 16 encoding
into plain
ol' ASCII aka 8 BIT ?

Example of files contents

0 255 254
2 60 0
4 72 0
6 84 0
8 77 0
10 76 0
12 62 0

or ..

0000000 377 376 < H T M L >

0000020 < B O D Y >
0000040


thanks,



--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-13-2008, 06:29 PM
"Kevin J. Cummings"
 
Default how to convert text file with unknown 16 bit encoding to 8 bit as cii

Lancashire, Pete wrote:

how do I convert a file (or output to stdont) with an unknown 16 encoding
into plain
ol' ASCII aka 8 BIT ?

Example of files contents

0 255 254
2 60 0
4 72 0
6 84 0
8 77 0
10 76 0
12 62 0

or ..

0000000 377 376 < H T M L >

0000020 < B O D Y >
0000040


thanks,


Is this a UTF-16 encoding?

--
Kevin J. Cummings
kjchome@rcn.com
cummings@kjchome.homeip.net
cummings@kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-14-2008, 08:42 AM
Mogens Kjaer
 
Default how to convert text file with unknown 16 bit encoding to 8 bit as cii

Lancashire, Pete wrote:

how do I convert a file (or output to stdont) with an unknown 16 encoding
into plain
ol' ASCII aka 8 BIT ?

Example of files contents

0 255 254
2 60 0
4 72 0
6 84 0
8 77 0
10 76 0
12 62 0

or ..

0000000 377 376 < H T M L >

0000020 < B O D Y >
0000040



Can you open the file in vim?

If I try a UTF-16 encoded file in vim, it shows the file correctly.

You can then set:

:set fileencoding=utf-8

and write out the file again (as a new file) to eliminate the NULL's.

Mogens


--
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: mk@crc.dk Homepage: http://www.crc.dk

--
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:53 PM.

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