[Gambas-user] problem with a file
Jean-Yves F. Barbier
12ukwn at ...626...
Wed Nov 25 09:49:22 CET 2009
Hi,
I read an .png file,
transform it into Base64,
write it to a PG DB table through a stored procedure (as TEXT),
and retrieve it.
My PB is: the original file length is 298 Bytes and my reading is 234
and I don't know why (whatever method I use instead od Base64, file's
always truncated.)
Here are the Hex readings:
ORIGINAL
00000000 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 18 00 00 00 18 08 06 00 00 .PNG........IHDR............
0000001C 00 E0 77 3D F8 00 00 00 F1 49 44 41 54 48 89 B5 93 4B 0E C2 20 14 45 0F B5 89 13 E3 ..w=.....IDATH...K.. .E.....
00000038 C0 44 07 BA B5 2E 82 A5 B0 08 F6 67 34 0E 4C FD E0 A4 D4 7E A0 3C 2B BD 23 E0 DD 77 .D.........g4.L....~.<+.#..w
00000054 EE A3 A4 B0 B0 94 C4 E4 4C E5 82 CD DA 26 FB 27 0D 31 F0 2F 41 C1 82 14 2C 09 1A 1D ........L....&.'.1./A...,...
00000070 CC 85 C7 42 7A 9B 7F E1 A1 90 22 07 70 32 CC 2F 72 4D DF 82 9B 5B 94 13 86 76 ED 4C ...Bz.....".p2./rM...[...v.L
0000008C 35 DF D3 14 7B D3 77 1B 63 00 A1 47 2D FE 06 A3 80 D0 64 C3 73 89 27 1A 90 5B A3 80 5...{.w.c..G-.....d.s.'..[..
000000A8 D8 63 75 CF 25 9E 68 40 6E 15 00 4A DB F5 D4 24 A1 C9 52 1E CF F4 FF C1 2A 05 08 29 .cu.%.h at ...2331...$..R.....*..)
000000C4 E1 29 81 DA 7F A2 97 D2 F6 98 24 0A A5 B4 3D 01 4F F8 BE 41 0D DC 73 05 34 AC BA 1B .)........$...=.O..A..s.4...
000000E0 00 70 55 DA EE FF 25 2B 6D 0F C0 B5 DD 0F EA 05 B0 75 A6 3A CF 84 EF 80 0B F0 8E 05 .pU...%+m........u.:........
000000FC 78 95 C0 46 1A D4 80 6F C0 63 54 13 F4 AF 9C A9 9E 11 70 09 BC 24 43 2C A6 0F 34 AA x..F...o.cT.......p..$C,..4.
00000118 60 57 32 C0 EB 38 00 00 00 00 49 45 4E 44 AE 42 60 82 `W2..8....IEND.B`.
RETRIEVED
00000000 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 18 00 00 00 18 08 06 00 00 .PNG........IHDR............
0000001C 00 E0 77 3D F8 00 00 00 F1 49 44 41 54 48 89 B5 93 4B 0E C2 20 14 45 0F B5 89 13 E3 ..w=.....IDATH...K.. .E.....
00000038 C0 44 07 BA B5 2E 82 A5 B0 08 F6 67 34 0E 4C FD E0 A4 D4 7E A0 3C 2B BD 23 E0 DD 77 .D.........g4.L....~.<+.#..w
00000054 EE A3 A4 B0 B0 94 C4 E4 4C E5 82 CD DA 26 FB 27 0D 31 F0 2F 41 C1 82 14 2C 09 1A 1D ........L....&.'.1./A...,...
00000070 CC 85 C7 42 7A 9B 7F E1 A1 90 22 07 70 32 CC 2F 72 4D DF 82 9B 5B 94 13 86 76 ED 4C ...Bz.....".p2./rM...[...v.L
0000008C 35 DF D3 14 7B D3 77 1B 63 00 A1 47 2D FE 06 A3 80 D0 64 C3 73 89 27 1A 90 5B A3 80 5...{.w.c..G-.....d.s.'..[..
000000A8 D8 63 75 CF 25 9E 68 40 6E 15 00 4A DB F5 D4 24 A1 C9 52 1E CF F4 FF C1 2A 05 08 29 .cu.%.h at ...2331...$..R.....*..)
000000C4 E1 29 81 DA 7F A2 97 D2 F6 98 24 0A A5 B4 3D 01 4F F8 BE 41 0D DC 73 05 34 AC BA 1B .)........$...=.O..A..s.4...
000000E0 00 70 55 DA EE FF 25 2B 6D 0F .pU...%+m.
Could somebody tell me why this happens?
JY
--
You will be dead within a year.
More information about the User
mailing list