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


ADVERTISEMENT

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 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

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

General :: Text To ASCII Art Command Line Tool?

Oct 24, 2010

I want a command line tool that echoes a string in ASCII art way, like here.

View 2 Replies View Related

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 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 :: 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

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

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

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

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

CentOS 5 :: How To Convert From Text Mode To GUI

Dec 9, 2009

i tried installing the GUI mode but it didnt happen. My system restarted in between the installation. So i installed the text mode. Now how to switch over to the GUI mode?

View 3 Replies View Related

CentOS 5 :: Text User Interface To Configure Text Files

Nov 5, 2009

I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.

View 19 Replies View Related

Ubuntu :: Able To Switch Between English And Japanese Text When Typing ?

Apr 21, 2010

I need to be able to switch between English and Japanese text when typing on my computer but I have no idea how to. I figured it out on both Windows and Mac but Ubuntu is giving me some trouble. I figure IBus is where I'm supposed to be going but even though I selected Japanese, it just isn't working.

View 2 Replies View Related

General :: How To Use Extended ASCII Characters

Apr 6, 2010

How can I use extended ascii characters, like ALT + 2 + 0 + 0 for instance? I'm using some of those characters for my passwords for online accounts made under MS Windows and it seams I'm unable to use them in Slackware 13. For instance: if I type ALT+2+0+0 in Pidgin there is no character displayed and if I type in the Terminal the same thing, it will replace my shell prompter (sasser@HOSTA:~$) with (arg: 200):
sasser@HOSTA:~$
(arg: 200)

View 2 Replies View Related

Programming :: Filter ASCII Characters PHP?

Mar 8, 2010

How can I filter ASCII quotes( ' ) and double quotes ( " ) so that I can replace them with the UTF-8 equivalent?If I copy text from a Word Document(ASCII), and upload it to a web page with PHP. The Database(UTF-8) will replace these racters with incorrect character(s).I need some function that will replace these characters but I don't know how to differentiate the ASCII quotes and the UTF-8 Quotes without (somehow) converting the string to hex, then preg_replace'ing the hex code for the symbol.

View 8 Replies View Related

Programming :: Not Reading Non-ASCII Characters

Apr 26, 2010

Well, I have a web application in Linux server. All my Java codes are there. FYI, whenever user entered non-ASCII characters(e.g. ∞,�,�) in a text field in my web application, and I check the log of my Java code in Linux server, it returns weird characters.

Suppose user entered ∞ in the text field. I should get ∞ in my log too. However, I got weird characters in return.

View 14 Replies View Related

Programming :: Print All ASCII Characters In C#?

Mar 9, 2011

i want to print all ASCII characters kind of like a table, but i really don't have an idea of how to do it, i don't know if there is a built-in method or something to accomplish this, if not

View 2 Replies View Related

Programming :: Qt Conversion From Ascii To QString?

Aug 25, 2010

I'm working on a Qt program and when it gets to the following line of code I get a seg fault:

QString blah = QString::fromAscii(entry->d_name, 256);

entry->d_name is a 256 byte character array returned by readdir(), I would expect this line of code to convert that character array from ascii to a QString, but I get a seg fault and I'm not entirely sure why..

View 2 Replies View Related

Slackware :: Watching A Movie In ASCII Art?

Jan 23, 2010

What do i have to make to be able to watch a movie in a TTY...? there is this library called AAlib, and there is a slackbuild for it, form osuosl [URL], but besides of this I do not know how it is done...

View 11 Replies View Related

Fedora :: Get Mplayer To Play Videos In ASCII?

Apr 5, 2010

I'm trying to get mplayer to play videos in ASCII, but I get an error... I don't know why. It works fine on my desktop, but my laptop is outputting an error...

This is the command:

Code:
mplayer -vo aa video.flv

This is the error I get:

Quote:

MPlayer SVN-r29800-4.4.2 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

[Code].....

View 2 Replies View Related

Ubuntu :: Bash - Shift Ascii Characters Up Or Down One

Feb 20, 2010

Say you wanted to write a bash script for "hello world" but the characters were shifted up or down by one.

How would one go about this?

Example:

Code:

Code:

View 5 Replies View Related

Ubuntu :: Compression Excluding Certain Ascii Characters?

Jun 8, 2011

I am working on a project where I am dialing out of a modem!! Old stuff, ya, but the modem allows my device send info from remote sites from my datibase through a phone line so that this IT departments dont have to worry my device being a security issue on their networks.

Any way, the modem I'm using isn't incredibly well designed, and when a certain ascii char is read by the modem, it reads it as an EOF indicator. It is also important that the files I send are compressed.

My question is: Does anyone know of a compression format that allows ME to dissallow IT's use of certain ascii chars?

just as an illustration:

Device --------> Modem ---------> Off-site

and the Modem stops talking to the device when a certain char is passed to it.

View 1 Replies View Related

SUSE :: Transferring Files Using FTP In ASCII Mode?

Nov 5, 2010

I am trying to download a EBCDIC file from z/Os to UNIX using FTP in ASCII mode. The problem I am seeing is; when UNIX FTP Client issues a get; UNIX CPU goes to 100% CPU utilization when transferring a file in ASCII mode. I have done packet traces using wireshark and noted that z/OS Server is translating the file to ASCII before putting it on the wire, however when UNIX FTP Client gets the file I believe that the UNIX FTP Client is again translating the file to ASCII causing the 100% CPU utilization. I need verification that this is what is happening, and is there a way of getting around this other then transferring the file in binary mode then doing a EBCDIC

View 1 Replies View Related

Networking :: JPG Corrupted After FTP-upload In ASCII Mode?

Nov 23, 2010

I just uploaded JPG pics from a Win XP, through shell, on my FTP.When I downloaded them back (to a UNIX machine), they were all currupted and unreadable !After some researches, I found that Win XP's shell works by default in ASCII mode.

View 3 Replies View Related

Networking :: ASCII / Binary FTP Transfer Modes

Sep 14, 2009

I had a problem with the old good ascii/binary FTP transfer modes. I transferred some files (SQL scripting files, in which carriage returns DO matter) using FTP from a windows system to a linux system using filezilla "auto" mode, that should have resulted in ASCII mode for my sql files. These files are well formed and identical to the originals.

Then, someone else picked these files and moved them to another ftp server. I finally found that all <CR><LF> couples have been transformed in <CR><CR><LF>. I guessed that the problem was in the ASCII transfer mode - but, how comes that <CR><LF> => <CR><CR><LF>? I would have rather expected <CR><LF> to become <CR>.

View 2 Replies View Related

General :: Getting Extended Ascii (chars > 127) To Work

Mar 4, 2011

I have an application where the client is written in Visual Studio (C#), run on PCs, and the server end has traditionally been SCO. We're now migrating to Linux. I can, for example, input "Test This" in a text box on the client, and when the server end is SCO, it is able to 'accept' the character sent to it from the client. When I try this same example on Linux, that character (hex D1) does not 'make it' from the client to the server.

The problem is not on the client, and I have verified that the telnet connection is in fact passing these extended characters, but they are not recognized properly by the Linux server.In researching this, I've played with setting the LANG environmental variable from LANG=en_US.UTF-8 to several of the other possible values found in /usr/lib/locale, for a european locale (the end user is actually in Spain), and these 'euro' characters are still not handled properly in my application.Would anyone be able to point me to any specific env variable settings, and/or anything else that would resolve this issue?

View 6 Replies View Related

Programming :: Output Data To An Ascii Table?

Oct 18, 2010

I've got lines of data in the following format:
space1=number of times error has occured
space2=IP address
space3=Error

I've set this out nicely with printf and made it email me, the problem is - it's not entirely clear what each column/space is and the IP and occurances can sometimes seem confusing. Is there any (easy) way to output this into an ascii like table? There will always be 5 occurances, and the format will always be the same

View 1 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







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