Export/Import failure

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Export/Import failure

TheQL
Hello,

I am trying to export messages as XML and them import them again. This does seem to fail in some cases, when the exported file contains some kind of string buffer. It complains about an invalid XML character (Unicode: 0x0)

</buffer>
    <__offset>0</__offset>
    <pos>2048</pos>
    <max>5123</max>
    <strbuffer></strbuffer>
    <captureLength>2048</captureLength>
  </dis>
  <array reference="../dis/buffer"/>
  <cnt>5123</cnt>

In Hex it looks like this:
00002050  20 20 20 3c 73 74 72 62  75 66 66 65 72 3e 00 00  |   <strbuffer>..|
00002060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00002150  00 00 00 00 00 00 00 00  00 00 00 00 00 00 3c 2f  |..............</|
00002160  73 74 72 62 75 66 66 65  72 3e 0a 20 20 20 20 3c  |strbuffer>.    <|
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Export/Import failure

TheQL
It looks like they imported just fine after running this replacement:

sed -e 's#<strbuffer>.*#<strbuffer></strbuffer>#' -i *
Loading...