Thanks for taking the time to help me.

Le 05/04/2012 08:48, Chris Allen a écrit :
Can you include all of the headers here please?

I have attached the beginning of the dump (tcpdump addresses are changed to 
aa.aa.aaa.aa
and bb.bbb.bb.bb but it's easy to find the real ones). Hope the list accepts 
attachments.
The whole dump is 2.5Mb so I won't post it to the list but I have it handy if 
you need.

It's possible you have more than one issue here. Firstly, what happens if you
upload several textfiles (ASCII data only)? Do they upload correctly? Or perhaps
they upload correctly but truncated?

Uploaded the full tcpdump (2670592bytes). It's pure 7-bit ASCII : same size, 
same md5sum
Uploaded a linux-header Makefile (53Kb). Probably 7-bit ASCII : same size, same 
md5sum

Uploaded a big ASCII file containing a few accents :
 1395336 original
 1395118 copy
Results are... insane : here is the diff :

diff -u 0410959v-phase2.txt 14.jpg
--- original    2011-09-05 15:18:49.000000000 +0200
+++ copy        2012-04-05 16:17:22.091080638 +0200
@@ -38,18 +38,18 @@
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
-Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
+Use of uninitialized value in numeric eq (==) at ext-bin/do_5_gense2.pl line 
1126.
+Use of uninitialized value in numeric et-bin/do_5_genfichiers_phase2.pl line 
1126.
+Use ofed value in n=) at ext-bin/do_5_genfichiers_phase2.pl line 1126.
+Use ozed value in numeric eq (==) at ext-bin/do_5_genfichiers_phase2.pl line 
1126.
+Use of uninitialized valu et-bin/do_5_genfichiers_phase2.pl line 1126.
+Use of uninite in numeric eq (==) at ext-bin/do_5_genfichiers_phase2.pl line 
1126.
+Use of uninitialized value in num a_5_genfichiers_phase2.pl line 1126.
+Use of uninitialized eric eq (==) at ext-bin/do_5_genfichiers_phase2.pl line 
1126.
+Use of uninitialized value in numeric eq (inhiers_phase2.pl line 1126.
+Use of uninitialized value in ==) at ext-bin/do_5_genfichiers_phase2.pl line 
1126.
+Use of uninitialized value in numeric eq (==) at exense2.pl line 1126.
+Use of uninitialized value in numeric et-bichiers_phase2.pl line 1126.
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
 Use of uninitialized value in numeric eq (==) at 
ext-bin/do_5_genfichiers_phase2.pl line 1126.
@@ -258,7 +258,7 @@
 Warning: Permanently added '[10.141.0.61]:2222' (RSA) to the list of known 
hosts.
 Ubuntu 10.04.3 LTS
 Warning: Permanently added '192.168.122.130' (RSA) to the list of known hosts.
-Arret du LDAP (patienter 10 secondes)
+Arret  LDAP (patienter 10 secondes)
 Stopping daemon monitor: monit.
 Stopping OpenLDAP: slapd.
 tar: Removing leading `/' from member names

The differences are lines 41-52 and 261 though the file is 23818 lines long. I 
guess it comes
from the fact that there's only one 32768-bytes buffer "corrupted" ?
Accents are only lines 2-191 (not on all lines)
The accents are still there, untouched. In the original file, they are UTF-8 
encoded :
iconv -f utf8 -t latin1 original >/dev/null
  -> no error

Also the files are not "truncated", there are bits randomly missing in the 
middle.


So as I understand it, the problemS (UTF8 encoding + bits missing) arise only 
when
non-UTF8 characters are encountered.

If you have ideas of where/what I can look next...

Thanks for your patience,

--
Jean-Christophe Boggio                       -o)
embp...@thefreecat.org                       /\\
Independant Consultant and Developer        _\_V
IP aa.aa.aaa.aa.39528 > bb.bbb.bb.bb.80: tcp 0
        0x0000:  4500 003c 5b37 4000 3a06 2ef5 5138 c040  E..<[7@.:...Q8.@
        0x0010:  58bf 4c58 9a68 0050 c490 1da4 0000 0000  X.LX.h.P........
        0x0020:  a002 3908 94e2 0000 0204 0584 0402 080a  ..9.............
        0x0030:  0035 4693 0000 0000 0103 0307            .5F.........
IP bb.bbb.bb.bb.80 > aa.aa.aaa.aa.39528: tcp 0
        0x0000:  4500 003c 0000 4000 4006 842c 58bf 4c58  E..<..@.@..,X.LX
        0x0010:  5138 c040 0050 9a68 6536 f044 c490 1da5  Q8.@.P.he6.D....
        0x0020:  a012 16a0 6a2c 0000 0204 05b4 0402 080a  ....j,..........
        0x0030:  2939 ce29 0035 4693 0103 0306            )9.).5F.....
IP aa.aa.aaa.aa.39528 > bb.bbb.bb.bb.80: tcp 0
        0x0000:  4500 0034 5b38 4000 3a06 2efc 5138 c040  E..4[8@.:...Q8.@
        0x0010:  58bf 4c58 9a68 0050 c490 1da5 6536 f045  X.LX.h.P....e6.E
        0x0020:  8010 0073 af19 0000 0101 080a 0035 469e  ...s.........5F.
        0x0030:  2939 ce29                                )9.)
IP aa.aa.aaa.aa.39528 > bb.bbb.bb.bb.80: tcp 1400
        0x0000:  4500 05ac 5b39 4000 3a06 2983 5138 c040  E...[9@.:.).Q8.@
        0x0010:  58bf 4c58 9a68 0050 c490 1da5 6536 f045  X.LX.h.P....e6.E
        0x0020:  8010 0073 0c18 0000 0101 080a 0035 469e  ...s.........5F.
        0x0030:  2939 ce29 504f 5354 202f 6164 6d69 6e2f  )9.)POST./admin/
        0x0040:  7068 6f74 6f73 6172 7469 7374 6573 2e68  photosartistes.h
        0x0050:  746d 6c20 4854 5450 2f31 2e31 0d0a 486f  tml.HTTP/1.1..Ho
        0x0060:  7374 3a20 7065 6572 6d75 7369 632e 6672  st:.peermusic.fr
        0x0070:  0d0a 5573 6572 2d41 6765 6e74 3a20 4d6f  ..User-Agent:.Mo
        0x0080:  7a69 6c6c 612f 352e 3020 2858 3131 3b20  zilla/5.0.(X11;.
        0x0090:  5562 756e 7475 3b20 4c69 6e75 7820 7838  Ubuntu;.Linux.x8
        0x00a0:  365f 3634 3b20 7276 3a31 312e 3029 2047  6_64;.rv:11.0).G
        0x00b0:  6563 6b6f 2f32 3031 3030 3130 3120 4669  ecko/20100101.Fi
        0x00c0:  7265 666f 782f 3131 2e30 0d0a 4163 6365  refox/11.0..Acce
        0x00d0:  7074 3a20 7465 7874 2f68 746d 6c2c 6170  pt:.text/html,ap
        0x00e0:  706c 6963 6174 696f 6e2f 7868 746d 6c2b  plication/xhtml+
        0x00f0:  786d 6c2c 6170 706c 6963 6174 696f 6e2f  xml,application/
        0x0100:  786d 6c3b 713d 302e 392c 2a2f 2a3b 713d  xml;q=0.9,*/*;q=
        0x0110:  302e 380d 0a41 6363 6570 742d 4c61 6e67  0.8..Accept-Lang
        0x0120:  7561 6765 3a20 6672 2c66 722d 6672 3b71  uage:.fr,fr-fr;q
        0x0130:  3d30 2e38 2c65 6e2d 7573 3b71 3d30 2e35  =0.8,en-us;q=0.5
        0x0140:  2c65 6e3b 713d 302e 330d 0a41 6363 6570  ,en;q=0.3..Accep
        0x0150:  742d 456e 636f 6469 6e67 3a20 677a 6970  t-Encoding:.gzip
        0x0160:  2c20 6465 666c 6174 650d 0a44 4e54 3a20  ,.deflate..DNT:.
        0x0170:  310d 0a43 6f6e 6e65 6374 696f 6e3a 206b  1..Connection:.k
        0x0180:  6565 702d 616c 6976 650d 0a52 6566 6572  eep-alive..Refer
        0x0190:  6572 3a20 6874 7470 3a2f 2f70 6565 726d  er:.http://peerm
        0x01a0:  7573 6963 2e66 722f 6164 6d69 6e2f 7068  usic.fr/admin/ph
        0x01b0:  6f74 6f73 6172 7469 7374 6573 2e68 746d  otosartistes.htm
        0x01c0:  6c0d 0a41 7574 686f 7269 7a61 7469 6f6e  l..Authorization
        0x01d0:  3a20 4261 7369 6320 5958 5669 636e 6b36  :.Basic.YXVicnk6
        0x01e0:  6247 6c69 636a 4134 4e6a 593d 0d0a 436f  bGlicjA4NjY=..Co
        0x01f0:  6e74 656e 742d 5479 7065 3a20 6d75 6c74  ntent-Type:.mult
        0x0200:  6970 6172 742f 666f 726d 2d64 6174 613b  ipart/form-data;
        0x0210:  2062 6f75 6e64 6172 793d 2d2d 2d2d 2d2d  .boundary=------
        0x0220:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x0230:  2d2d 2d2d 2d31 3932 3338 3536 3439 3331  -----19238564931
        0x0240:  3336 3037 3438 3535 3634 3937 3730 3733  3607485564977073
        0x0250:  3136 0d0a 436f 6e74 656e 742d 4c65 6e67  16..Content-Leng
        0x0260:  7468 3a20 3139 3536 3132 0d0a 0d0a 2d2d  th:.195612....--
        0x0270:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x0280:  2d2d 2d2d 2d2d 2d2d 2d2d 2d31 3932 3338  -----------19238
        0x0290:  3536 3439 3331 3336 3037 3438 3535 3634  5649313607485564
        0x02a0:  3937 3730 3733 3136 0d0a 436f 6e74 656e  97707316..Conten
        0x02b0:  742d 4469 7370 6f73 6974 696f 6e3a 2066  t-Disposition:.f
        0x02c0:  6f72 6d2d 6461 7461 3b20 6e61 6d65 3d22  orm-data;.name="
        0x02d0:  4273 6176 6522 0d0a 0d0a 456e 7265 6769  Bsave"....Enregi
        0x02e0:  7374 7265 720d 0a2d 2d2d 2d2d 2d2d 2d2d  strer..---------
        0x02f0:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x0300:  2d2d 2d2d 3139 3233 3835 3634 3933 3133  ----192385649313
        0x0310:  3630 3734 3835 3536 3439 3737 3037 3331  6074855649770731
        0x0320:  360d 0a43 6f6e 7465 6e74 2d44 6973 706f  6..Content-Dispo
        0x0330:  7369 7469 6f6e 3a20 666f 726d 2d64 6174  sition:.form-dat
        0x0340:  613b 206e 616d 653d 2275 706c 3637 223b  a;.name="upl67";
        0x0350:  2066 696c 656e 616d 653d 2222 0d0a 436f  .filename=""..Co
        0x0360:  6e74 656e 742d 5479 7065 3a20 6170 706c  ntent-Type:.appl
        0x0370:  6963 6174 696f 6e2f 6f63 7465 742d 7374  ication/octet-st
        0x0380:  7265 616d 0d0a 0d0a 0d0a 2d2d 2d2d 2d2d  ream......------
        0x0390:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x03a0:  2d2d 2d2d 2d2d 2d31 3932 3338 3536 3439  -------192385649
        0x03b0:  3331 3336 3037 3438 3535 3634 3937 3730  3136074855649770
        0x03c0:  3733 3136 0d0a 436f 6e74 656e 742d 4469  7316..Content-Di
        0x03d0:  7370 6f73 6974 696f 6e3a 2066 6f72 6d2d  sposition:.form-
        0x03e0:  6461 7461 3b20 6e61 6d65 3d22 7570 6c34  data;.name="upl4
        0x03f0:  3422 3b20 6669 6c65 6e61 6d65 3d22 220d  4";.filename="".
        0x0400:  0a43 6f6e 7465 6e74 2d54 7970 653a 2061  .Content-Type:.a
        0x0410:  7070 6c69 6361 7469 6f6e 2f6f 6374 6574  pplication/octet
        0x0420:  2d73 7472 6561 6d0d 0a0d 0a0d 0a2d 2d2d  -stream......---
        0x0430:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x0440:  2d2d 2d2d 2d2d 2d2d 2d2d 3139 3233 3835  ----------192385
        0x0450:  3634 3933 3133 3630 3734 3835 3536 3439  6493136074855649
        0x0460:  3737 3037 3331 360d 0a43 6f6e 7465 6e74  7707316..Content
        0x0470:  2d44 6973 706f 7369 7469 6f6e 3a20 666f  -Disposition:.fo
        0x0480:  726d 2d64 6174 613b 206e 616d 653d 2275  rm-data;.name="u
        0x0490:  706c 3238 3622 3b20 6669 6c65 6e61 6d65  pl286";.filename
        0x04a0:  3d22 220d 0a43 6f6e 7465 6e74 2d54 7970  =""..Content-Typ
        0x04b0:  653a 2061 7070 6c69 6361 7469 6f6e 2f6f  e:.application/o
        0x04c0:  6374 6574 2d73 7472 6561 6d0d 0a0d 0a0d  ctet-stream.....
        0x04d0:  0a2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  .---------------
        0x04e0:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 3139  --------------19
        0x04f0:  3233 3835 3634 3933 3133 3630 3734 3835  2385649313607485
        0x0500:  3536 3439 3737 3037 3331 360d 0a43 6f6e  56497707316..Con
        0x0510:  7465 6e74 2d44 6973 706f 7369 7469 6f6e  tent-Disposition
        0x0520:  3a20 666f 726d 2d64 6174 613b 206e 616d  :.form-data;.nam
        0x0530:  653d 2275 706c 3239 3822 3b20 6669 6c65  e="upl298";.file
        0x0540:  6e61 6d65 3d22 220d 0a43 6f6e 7465 6e74  name=""..Content
        0x0550:  2d54 7970 653a 2061 7070 6c69 6361 7469  -Type:.applicati
        0x0560:  6f6e 2f6f 6374 6574 2d73 7472 6561 6d0d  on/octet-stream.
        0x0570:  0a0d 0a0d 0a2d 2d2d 2d2d 2d2d 2d2d 2d2d  .....-----------
        0x0580:  2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d 2d2d  ----------------
        0x0590:  2d2d 3139 3233 3835 3634 3933 3133 3630  --19238564931360
        0x05a0:  3734 3835 3536 3439 3737 3037            748556497707
IP bb.bbb.bb.bb.80 > aa.aa.aaa.aa.39528: tcp 0
        0x0000:  4500 0034 3e7d 4000 4006 45b7 58bf 4c58  E..4>}@.@.E.X.LX
        0x0010:  5138 c040 0050 9a68 6536 f045 c490 231d  Q8.@.P.he6.E..#.
        0x0020:  8010 0088 a97d 0000 0101 080a 2939 ce38  .....}......)9.8
        0x0030:  0035 469e                                .5F.
IP aa.aa.aaa.aa.39528 > bb.bbb.bb.bb.80: tcp 1400
        0x0000:  4500 05ac 5b3a 4000 3a06 2982 5138 c040  E...[:@.:.).Q8.@
        0x0010:  58bf 4c58 9a68 0050 c490 231d 6536 f045  X.LX.h.P..#.e6.E
        0x0020:  8010 0073 54d7 0000 0101 080a 0035 469e  ...sT........5F.
        0x0030:  2939 ce29 3331 360d 0a43 6f6e 7465 6e74  )9.)316..Content
        0x0040:  2d44 6973 706f 7369 7469 6f6e 3a20 666f  -Disposition:.fo
        0x0050:  726d 2d64 6174 613b 206e 616d 653d 2275  rm-data;.name="u
        0x0060:  706c 3134 223b 2066 696c 656e 616d 653d  pl14";.filename=
        0x0070:  2261 6c62 756d 2d31 3934 3132 2e6a 7067  "album-19412.jpg
        0x0080:  220d 0a43 6f6e 7465 6e74 2d54 7970 653a  "..Content-Type:
        0x0090:  2069 6d61 6765 2f6a 7065 670d 0a0d 0aff  .image/jpeg.....
        0x00a0:  d8ff e000 104a 4649 4600 0101 0100 4800  .....JFIF.....H.
        0x00b0:  4800 00ff db00 4300 0101 0101 0101 0101  H.....C.........
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-h...@perl.apache.org

Reply via email to