| View previous topic :: View next topic |
| Author |
Message |
pminter Newbie

Joined: 15 Aug 2004 Posts: 4
|
Posted: Sun Sep 19, 2004 9:29 pm Post subject: find & replace truncation |
|
|
In doing a "Replace All" function intended to delete all the paragraph marks in a UTF-8 encoded text file using the regular expression "$" I have found that after the 65535th character (i.e. 64K) the file gets truncated. If the file is significantly longer than that the final portion of the file is included, but there is still that missing portion after the 64K limit. I have not found what the parameter might be that determines how much of the end of the file is included, but it goes from some (random?) point all the way to the end.
I thought maybe someone else has had something similar and can tell me how to avoid it - other than splitting my files.
I use OpenOffice.org 1.1.2 running on Windows XP Pro with 512Mb of memory. |
|
| Back to top |
|
 |
Iannz OOo Advocate

Joined: 14 Feb 2004 Posts: 494 Location: Christchurch, New Zealand
|
Posted: Mon Sep 20, 2004 4:54 pm Post subject: |
|
|
I would appreciate it if you would test my find & replace macro and let me know if it has the same problem.
The macro is in a document called IannzFindReplace.sxw available from the url in the signature. _________________ Cheers, Ian
http://wiki.services.openoffice.org/wiki/Extensions_development_basic a wiki about writing OpenOffice.org extensions. |
|
| Back to top |
|
 |
pminter Newbie

Joined: 15 Aug 2004 Posts: 4
|
Posted: Mon Sep 20, 2004 9:34 pm Post subject: |
|
|
I tried IannzFindReplace and it appears that, besides being very slow at the replace, it has the same problem. I watched it get to the 64K mark in the file as it was working and from that point to the next paragraph mark was truncated, then it picked up with the replacing from that point on.
I was reading Andrew Pitonyak's Macro Document since I posted originally. He makes a reference to a 64K limit on strings, so that may be what is coming into play here. I just don't know enough about OOo Basic to do anything other than fiddly workarounds like splitting the file.
Paul |
|
| Back to top |
|
 |
JohnV Administrator

Joined: 07 Mar 2003 Posts: 8979 Location: Lexinton, Kentucky, USA
|
|
| Back to top |
|
 |
|