Re: how to convert text file with unknown 16 bit encoding to 8 bi t as cii

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Pete" == Lancashire, Pete <plancashire@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux