View Full Version : what is \t ??
magicwand
04-24-2003, 08:41 PM
it probably is dumb question but...
what is \t?
\n is new line i think...
i see \t and dont know what that is...
thank you in advance.
freddycodes
04-24-2003, 10:33 PM
Its a tab character. But like \n not one that a browser would recognize.
magicwand
05-07-2003, 07:57 PM
thanks freddy.
another question...
what is the difference between \n and \r ?
i am trying to build php server locally.
in php, is there any setting that ignore \r ?
it's setting is different from the server i used before and giving me trouble.
old code is :
$fields = explode("\n",$buf);
but new local server i have to change to :
$fields = explode("\r\n",$buf);
i am not 100%sure what is going on. but..
after many trial and error, came to conclusion that \r is giving me trouble.
i am assuming there is some setting i can change on local server..
is my assumtion true?
any input will be appreciated greatly.
thanks.
freddycodes
05-07-2003, 08:07 PM
I assume old server is a unix machine. On unix a newline is \n and on windows its \r\n so your new local server is on windows right?
magicwand
05-07-2003, 08:30 PM
old server is Linux
new server is also Linux (redhat)
freddycodes
05-07-2003, 08:32 PM
Interesting, is there any difference from the last time you created the text with the linebreaks, like creating the text on a different platform than before? Caus eas I said \r\n is a dos linebreak and \n is a unix newline.
magicwand
05-07-2003, 08:54 PM
i am still at this problem..
i somehow got it to work..( i dont know how)
anyway...one more question.
can you explain to me difference between
ascii and binary?
freddycodes
05-07-2003, 09:00 PM
No not really. I know that a binary format is somehow encoded , used for images and swfs, and other things. Ascii is character based, other than that, I have no idea.
OctavioSiqueira
05-09-2003, 03:43 AM
If you're talking about file formats, I think I know the difference:
In a certain way, every file is a binary file:
- a JPEG file is a binary file encoded with the JPEG image compression algorithm;
- a Word 2000 (.doc) file is a binary file that follows a standard defined by Microsoft;
- a Flash (.swf) file is a binary file that follows a standard defined by Macromedia;
...
- a ASCII or "Text" file is a binary file represented by 8 bit codes. These 8 bit codes are called ASCII characters. It is a very old and popular file format. Every OS recognizes this format with minimal differences(like the '\n' for Unix and the '\r\n' for DOS). In some computer languages one can open a text file in a way that makes it a little easier to manipulate.
Here is an ASCII table reference:
http://www.asciitable.com
See ya
magicwand
05-09-2003, 03:58 AM
million thanks.
now it is very clear.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.