C# - String stored as Base64, but the retreived string is not a valid base64 string -


i'm using base64 encoding store values data structure string. convert byte array base64 string

string storeddata = convert.tobase64string(bytearray);  

i divide storeddata strings of maximum length of 256 characters , store them ascii string (in autocad xdata dxfcode.extendeddataasciistring) .

when want retrieve data following:

first combine each 256 long string using storeddata = sting1 + string2 + ... convert storeddata bytearray using

var bytearray = convert.frombase64string(storeddata); 

now has worked great me , clients until month ago, 1 of clients has had crash , errors popping up. asked him send me stored data, , got surprised see data contained invalid base64 characters (see sample below)

tm7x24qlllalr5ivax3xfam7uciyxrcjkxsfd3xol/kgic3c+jmo8qjht/4c+puyrnlq5r9is0vpdkyuxw9i6r3f1luoysdhs6xgzjeymvgwshnrsyj/a0ioumqftb3xspqrwp4qsd7qcuvsrxw0+2rs/sd2vavufxeqgwshaabb01yjchgeyxr1f78a4qy2bl/ohasrak9uyn0mdzhzgbhpahlgdk3ewd8b2btm01lwh74pyurjr+jfq0tw0eu㿔

z/1jxbmuv2cb6nrfehsunf9l4dhaazq+tciclzmk/zc8tj0rkka/j+hqhldawwexb3nxoii00ujne7j4r6ru+q==

as can see first 256 long string had invalid base64 character (㿔)

why happening? can related users computer? tried replicate error without success , because don't have access computers, i'm starting think might on side.

the application uses .net framework version 4.5.

edit: turned out client has sent me recovered document didn't recover text strings explains corrupted string.

it turns out app has crashed , client has recovered drawing document corrupted string.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -