Red Hat :: Convert A Unicode File To Ascii?

Jul 1, 2010

I need to be able to convert a unicode file to ascii using red hat.

View 1 Replies


ADVERTISEMENT

General :: Convert Binary File In To Ascii File Using Shell Script?

May 23, 2011

i am trying to convert a binary file in to ASCII using shell script. this file contains multiple types of data like string, number, bcd, etc.

View 5 Replies View Related

General :: Tool To Convert A File Of HEX To ASCII Character Set?

Feb 10, 2011

Is there a known tool to convert a file consisting of 2 byte Hex into ascii?

Note: - Maintain file offset listing in bytes code...

View 3 Replies View Related

Debian :: Perl Script - Converting Unicode To ASCII?

May 7, 2010

I'm trying to write a Perl script that will convert text to ASCII. I'm particularly interested in converting files created with MS Windows, so I used Notepad to create a few test files.

I have had some success with the following script:
[[ Script Deleted -- see subsequent posts ]]

After coming back /home/ to Debian, I used file to examine the file types:
$ file ansi.txt unicode_big-endian.txt unicode.txt utf8.txt
ansi.txt: ASCII text, with CRLF line terminators
unicode_big-endian.txt: Big-endian UTF-16 Unicode character data, with CRLF line terminators
unicode.txt: Little-endian UTF-16 Unicode character data, with CRLF, CR line terminators
utf8.txt: UTF-8 Unicode (with BOM) text, with CRLF line terminators

After running:
$ uni2ascii.pl -i ansi.txt -c ASCII -o new_ansi.txt
$ uni2ascii.pl -i unicode_big-endian.txt -c utf16 -o new_unicode_big-endian.txt
$ uni2ascii.pl -i unicode.txt -c utf16 -o new_unicode.txt
$ uni2ascii.pl -i utf8.txt -c utf8 -o new_utf8.txt

Everything appears good:
$ file new_ansi.txt new_unicode_big-endian.txt new_unicode.txt new_utf8.txt
new_ansi.txt: ASCII text
new_unicode_big-endian.txt: ASCII text
new_unicode.txt: ASCII text
new_utf8.txt: ASCII text

But the "little-endian file" does not convert properly:
$ md5sum new_ansi.txt new_unicode_big-endian.txt new_unicode.txt new_utf8.txt
c4def7932bc151b9e786b6ca1299162c new_ansi.txt
c4def7932bc151b9e786b6ca1299162c new_unicode_big-endian.txt
5b62a013dced4f2c2c0af45ea6388c1e new_unicode.txt
c4def7932bc151b9e786b6ca1299162c new_utf8.txt

When I use cat to print the new_unicode.txt file in an Emacs terminal, a ^@ appears on the last (empty) line. When I open the new_unicode.txt with KWrite, a warning message tells me that the file is a "binary" and "saving it will result in a corrupt file."

View 14 Replies View Related

Programming :: Checking Function - Character ASCII Or Unicode

Jan 20, 2009

To know the function on checking whether a character is ascii or unicode character. From the following [uRL]. The function IsTextUnicode is related to Windows VC++ library. I would like to know the library/function which provides such facility.

View 2 Replies View Related

Programming :: Convert Multiple File In Directory - Ascii To Hex In Perl ?

Apr 9, 2011

I have found a perl script that can convert single file: ascii to hex.

However I have thousand of file that I want to convert from ascii to hex.

Here is the perl script that convert single ascii file to hex in single line:

Quote:

So I would like to read multiple file from a directory.

Then the file will be have same name file with hex data.

Here is sample of the read and write directory file.

Quote:

View 3 Replies View Related

Server :: Convert A Hex File To An ASCII File?

Sep 8, 2010

I have a file of 2GB size in hex form. This is a log file from the server which I converted to hex as the file got corrupted.Can anyone tell how to convert this hex file to ASCII?

View 1 Replies View Related

General :: Convert Text To ASCII?

May 20, 2010

how i can convert a text to ASCII? >>> ( to encrypt the text ) and how can we use the "hexdump"

View 5 Replies View Related

General :: Convert To ASCII Format Under OpenWrt?

Feb 16, 2011

[URL] under Fedora 14 - Bash:
$ cat asdf | iconv -c -t ASCII
<a href="http://www.net-security.org/secworld.php?id=10607">biometric cabinet lock detects life in the finger</a>
ASDF
$
[Code]...

But theres no iconv under OpenWrt. Are there other working methods to convert a piped ( "|" ) text to only ascii format (under OpenWrt 10.03)?

View 1 Replies View Related

General :: Convert The Numbers Back Into Their Corresponding ASCII Character

May 19, 2010

To encrypt the text, we take the word "python" and make it at least the same size as "welcome home" by repeating it as follows:

w e l c o m e h o m e
p y t h o n p y t h o n
Then, we convert each letter into its numerical ASCII value as follows:
w e l c o m e h o m e = 119 101 108 099 111 109 101 032 104 111 109 101

[Code].....

And, finally, we convert the numbers back into their corresponding ASCII character:

View 11 Replies View Related

General :: Convert Binary Number To Text/ascii?

Mar 16, 2011

is there command in linux which is able to convert binary (0101001010000100) to text like it means something

View 4 Replies View Related

CentOS 5 :: Convert Between "ASCII English Text" And "ASCII Text"?

Aug 3, 2011

This is weird, and I never noticed before, but now I have an application that is borking on weird things like when /etc/hosts is of one file format or another, and I don't even know the difference between the two (google doesn't tell much either). on CentOS 5.5/5.6 x86_64: a which on the following is an interesting tell:

vi = /bin/vi
vim = /usr/bin/vim

both are actually vim version 7.0.237 but sum differently, and although they are both actually separate executables in the stock installs of CentOS I've been building, on most distros, and older versions of CentOS it seems, vi is usually just a symlink to vim - but again, not in these fresh installs it seems. When I create a file with the 'vi' above, it defaults (usually) to "ASCII text" (but not always) When I create a file with the 'vim' above, it defaults to "ASCII English text" (and causes a particular application I'm working with to bork and barf). It seems the OS is installed by default yielding both file types too, as evidenced by the following:

[Code]...

View 4 Replies View Related

Programming :: Prepend To ASCII Text File In C?

Jun 15, 2010

To start off I would like to acknowledge that I am not a very good C programmer and pretty much everything I know has been self taught through mostly trial and error. So forgive me if there is an obvious answer to my question, or if I don't immediately grasp the concepts involved in the possible solution.

Basically, I'm writing an application which will be creating log file entries rather rapidly (potentially hundreds per minute), and I would like each new line to appear at the top of the log file, rather than the end. Opening a text file in append mode is easy enough, but I can't seem to find any obvious way to do the opposite.

I have been looking online and it seems that there exists no standard way to do this, and I have only been able to find a few mentions of how somebody might achieve it. The most common method seems to be using two files and copying the data back and forth between them. This seems like it would be insanely I/O intensive with the number of lines I'm likely to be generating. If this is the best method to use, I will give it a shot; though I am not 100% clear on how to implement it, I am also open to any other ideas as to how to accomplish this, and I don't have to worry about portability since the program already uses Linux-only libraries. So calling out to sed or something is not necessarily out of the question (though I imagine performance would also be an issue there).

View 4 Replies View Related

Ubuntu Multimedia :: Unable To Use 'convert' In Command Prompt To Convert Image File Format

Jan 19, 2010

I am trying to use 'convert' in command prompt to convert image file format.I get the following error.

convert: UnableToOpenConfigureFile `delegates.xml' @ configure.c/GetConfigureOptions/589.
convert: NoDecodeDelegateForThisImageFormat `airplane.jpg' @ constitute.c/ReadImage/530.
convert: MissingAnImageFilename `airplane.ppm' @ convert.c/ConvertImageCommand/2838.

View 3 Replies View Related

Ubuntu :: Delete All ASCII Characters In File - Leave Chinese Characters Only

Jul 8, 2011

What command could I use in terminal to delete all ASCII characters? That is, delete a-z, A-Z, 0-9, and all punctuation? I have a file containing Chinese characters, and I want to remove everything else and leave just the Chinese.

I can use grep to leave only the lines that have Chinese in them, but this still leaves a lot of non-Chinese stuff on those lines. Does anyone know how I could actually remove everything that isn't Chinese?

View 4 Replies View Related

Ubuntu Multimedia :: Convert An Ogv File To An Ogg Or Mp3 File - Or Really ANY Audio File ?

Jul 16, 2010

I would like to convert OGV files to audio format.

View 4 Replies View Related

General :: Convert Fdf File To Xsf File Or Xyz File On Ubuntu 9.10_32 Bit?

Nov 7, 2010

I want to convert fdf file to xsf file or xyz file on ubuntu 9.10_32 bit .

View 5 Replies View Related

Red Hat / Fedora :: Convert Plain Text File To Html File Without Using Perl?

Jun 9, 2010

I am looking for some source package which will convert plain text file to html file without using perl.

I mainly need to do this on an ARM platform, so if I get sources I can cross compile it.

View 5 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

Ubuntu :: Convert A .avi File To A .iso File Using Devede - Choosing No Menu?

Jul 23, 2011

I get an error when trying to convert a .avi file to a .iso file using Devede. If I leave the "Create a menu with the titles" option as is I get no error. But I don't want any slideshow so I untick that option. I then get this error when the process is almost done; Failed to create the DVD tree Maybe you ran out of disk space I do have enough disk space so that can't be the problem. Anyone know what to do about this problem?

View 4 Replies View Related

Software :: Finding A Tool That Can Directly Convert Mp3 File To A Swf File?

Jan 26, 2009

I'm looking for a tool that can directly convert mp3 file to a swf file. Tried ffmprg - 'ffmpeg -i master.mp3 -ar 22050 -ab 32 -f swf -y -vn new.swf', output is as follows:

Output #0, swf, to 'new.swf':
Stream #0.0: Audio: 0x0000, 22050 Hz, stereo, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

I found a way to perform this task using ffmpeg to convert the mp3 file to a wav file, and converting the wav into a swf file using swftools (wav2swf), although this is not a good option because the output swf file size is very big - for a 12mb input 320kbps stereo mp3 file, the swf file is 25mb. Also downloaded a free direct mp3 to swf conversion software, which had an output swf file - with the same 12mb mp3 file - of ~400kb.

The requirements I have from the tool are:

1. Can be ran from the shell.

2. Direct conversion, or an indirect one that will produce a small output swf file.

3. Suport for multiple file conversion is a plus.

View 6 Replies View Related

Programming :: Convert An Arbitrary Binary File Into A Executable File?

Feb 18, 2010

In a project I'm working on with a few other people, I got the task of writing an assembler. The last thing I do is convert the commands into a binary representation, and jam it into a file. Now one of my teammates said he'd like to be able to "reference" the code within another program. He said he'd be able to do this if the file I output is a Linux object file. I'm thinking it'd also work as an executable. Anyway, he said he'd like to be able to grab the file and reference the binary by address. I'm still fuzzy on this, and if you're confused with what I said here, please tell me so I can ask him for better details.Anyway, I'm aware that gcc can compile files to ".o", but that's only for C/C++, and my file is just binary. I'm also aware of "ld", but I haven't seen any use of it to help me. I'm happy to hear suggestions as to what I can do. If anything, I think I'll implement a few functions to grab the bits and hand them to him in an array or something.

View 8 Replies View Related

Fedora :: Convert A Postscript File To A Gerber File?

Nov 10, 2009

Anyone know of any programs to convert a postscript file to a gerber file? LinkCAD can do it, but, it is very expensive and I can't get the demo to run.

View 1 Replies View Related

OpenSUSE :: Convert Vob / Mpg File To A Flv File Using VLC Media Player?

Mar 28, 2010

I would like to know how to convert a vob or a mpg file to a flv file using VLC Media Player.

View 9 Replies View Related

Ubuntu :: Convert A .ods File To A .csv File Via Command Line?

Oct 28, 2010

I would like to convert a .ods file to a .csv file via command line on a server running ubuntu with no graphical interface.

xls2csv does a perfect job on xls files; is there something similar for ods files?

View 1 Replies View Related

Ubuntu Multimedia :: Convert A Avi File With Subtitles Into An Iso File?

Sep 1, 2011

trying to convert a avi file with subtitles into a iso file ready for burning on to a disc, I am using DeVeDe to convert the file but I keep getting the error SPUMUX when trying to convert. I have no idea on what to do with this, is it because I am trying to convert to ISO? should I just try to convert to MPEG instead would that stop the error?

View 1 Replies View Related

General :: Convert A Html File Into A Text File?

Mar 8, 2010

i'm trying to convert a html file into a text file when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it. i even tried -ascii,but no much use.

View 4 Replies View Related

General :: Convert Batch File Into A .sh File Will Not Work

Sep 16, 2010

I am trying to convert my batch file into a .sh file and i think i have it perfect but it just will not work, so obviously not perfect. This is the code for my batch file.

[Code]....

This works perfectly on my own computer without any problems. I want to host this on my Linux VPS (CentOS 5) and need it to be converted into run.sh. This is the code for my run.sh.

[Code]....

View 9 Replies View Related

General :: Convert A .flv File To An Mpeg File Using Ffmpeg?

Jan 4, 2011

Recently I tried to convert a .flv file to an mpeg file using ffmpeg. Although I changed directory to the directory in which the.flv file resided FFMPEG said the file did not exist. However when I gave the "ls" command the file was present. Where is my mistake?

View 2 Replies View Related

General :: FTP "ASCII" Mode - RFC 959 - "File Transfer Protocol"

Jun 8, 2010

[ This thread is a result of <<mod edit---another thread>> RFC 959, "File Transfer Protocol", dictates:

Code:

3.1.1.1. ASCII TYPE

This is the default type and must be accepted by all FTP implementations. It is intended primarily for the transfer of text files, except when both hosts would find the EBCDIC
type more convenient.

The sender converts the data from an internal character representation to the standard 8-bit NVT-ASCII representation (see the Telnet specification). The receiver will convert the data from the standard form to his own internal form. In accordance with the NVT standard, the <CRLF> sequence should be used where necessary to denote the end of a line of text. Regardless of <<mod edit--another member's>> attempt to misinform and claim some sort of expertise in whatever, the ASCII mode works as expected.

Quote:

// From <<mod edit---another thread>>

So, go on, vi a document in linux, save it with a .txt extension then ftp get it from a windows machine. Make sure to open it with Notepad. I am writing this post from the very same Windows machine I used in order to conduct the exact experiment you are suggesting. The text file has been successfully converted. If it has not worked for you in about 20 years, I would suggest you start using an FTP server that does not suck, or for the very least one that respects the FTP standard. It is also possible that you used a client which does not use ASCII mode by default, in which case we are dealing with PEBKAC rather than with bad server software.

The purpose of this thread isn't to continue the odd debate regarding signatures that was starting in <<mod edit---another thread>> but rather to (hopefully) protect various users from trusting <<mod edit--another member>> in this certain (FTP) matter. Tinkster closed the thread just as I was preparing to post, thus giving <<mod edit--another member>> the last "word". Once again: he doesn't know what he is talking about, despite his "doing this for over a decade". I'm wondering if "this" means "spreading misinformation and reinforcing it with claims of being an expert".

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved