can this line be the fault ?
That should create a standard properly terminated string, not a problem
what does a4 look like before the write?
do a
That should create a standard properly terminated string, not a problem
what does a4 look like before the write?
do a
print(a4)just before the write.