[asterisk-users] AEL - what is error: ael.flex:647 ael_yylex:Unhandled char(s):

Zeeshan Zakaria zishanov at gmail.com
Wed Aug 25 21:40:52 CDT 2010

Thanks Steve for clearing this confusion.

Zeeshan A Zakaria


On 2010-08-25 3:16 PM, "Steve Edwards" <asterisk.org at sedwards.com> wrote:

On Wed, 25 Aug 2010, Zeeshan Zakaria wrote:

> Apparently all Linux files have a mime type informati...
Linux files are just a byte stream. They do not have "mime type
information stored in them."

"file" works by examining the first x bytes of the file and comparing this
to a "magic" file of "rules" to guess file types.

For instance, a JPEG file starts with "0xff 0xd8 0xff 0xe1."

The "-i" or "--mime" command line option causes file to display a "mime
type" instead of a "more traditional human readable" one.

The "hexdump" command will show you the "binary" contents of a file in a
variety for formats:

# Create a file with 2 lines
$ printf "line 1\nline 2\n" >foo

# Dump the file. Note that "0a" (newline, aka line-feed) is the line
# ending character.
$ hexdump -C foo
00000000  6c 69 6e 65 20 31 0a 6c  69 6e 65 20 32 0a        |line 1.line 2.|

# file says it is just ASCII text, like all text files on Unix should be.
$ file foo
foo: ASCII text

# Convert the file to DOS line endings
$ unix2dos foo
unix2dos: converting file foo to DOS format ...

# Dump the file. Note that the line ending characters are now "0d"
# (carriage return) and "0a" (newline).
$ hexdump -C foo
00000000  6c 69 6e 65 20 31 0d 0a  6c 69 6e 65 20 32 0d 0a  |line 1..line

# file says it has "funky" line endings.
$ file foo
foo: ASCII text, with CRLF line terminators

CRLF = Carriage Return, Line Feed -- think of a typewriter. Watch the
History Channel for more info.

Thanks in advance,
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


-- Bandwidth and Colocation Pr...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100825/aca016bf/attachment.htm 

More information about the asterisk-users mailing list