Thread Python rockz! (82 answers)
Opened by pktm at 2007-06-03 17:08

GwenDragon
 2007-06-13 20:17
#23811 #23811
User since
2005-01-17
14601 Artikel
Admin1
[Homepage]
user image
Jaja, das \n und andere.
In CGI.pm gibt es sowas zum Nachschauen.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Define the CRLF sequence.  I can't use a simple "\r\n" because the meaning
# of "\n" is different on different OS's (sometimes it generates CRLF, sometimes LF
# and sometimes CR).  The most popular VMS web server
# doesn't accept CRLF -- instead it wants a LR.  EBCDIC machines don't
# use ASCII, so \015\012 means something different.  I find this all
# really annoying.
$EBCDIC = "\t" ne "\011";
if ($OS eq 'VMS') {
 $CRLF = "\n";
} elsif ($EBCDIC) {
 $CRLF= "\r\n";
} else {
 $CRLF = "\015\012";
}

Es gibt eben OS die ganz anders ticken.
Zudem ist nicht immer alles oktal richtig ;)\n\n

<!--EDIT|GwenDragon|1181751484-->

View full thread Python rockz!