Macro File Read Problem In Regular Text Tool


Renerabbitt
 Share

Recommended Posts

On 8/11/2023 at 6:29 PM, Chopsaw said:

That seems like a pretty good reason to use Rich Text.   Any sort of inconsistency with that CSV that might be carrying through ?  Line one is not so great but line thee looks fine.

 

On 8/11/2023 at 9:11 PM, SHCanada2 said:

i'd throw in a \n at the beginning of the buffer variable you are writing out,  to see if that makes a difference as it looks to only occur on the first line

Switched to tab breaks and its even worse...seems to be duplicating data..this has to be a bug
.Also tried a new line to start and that doesnt change anything
image.thumb.png.b2b8b46065dec4180adf775f13f6dbbc.png

Link to comment
Share on other sites

The simple answer is csv's have some control characters which:

  • Rich Text understands correctly.
  • Standard Text doesn't.

in your case it's probably a control character that standard text thinks is a backspace.

 

It's for that reason that I use txt files which I can read and display in either.

 

btw, Rich Text is almost superfluous for macro output since it can only apply to the entire string (every line).  IOW, you will just get one text style.

  • Upvote 1
Link to comment
Share on other sites

On 8/14/2023 at 11:29 AM, Renerabbitt said:

Switched to tab breaks and its even worse...seems to be duplicating data..this has to be a bug

post the CSV

 

you can view it in a hex editor to see if there is anything funny. However if you just open up a new text file in notepad and type in the chracters with commas, and then save it, and then see if you still get the error, 

To check your code, you could just read the first character in the newly created file from above, and see if it is screwed up. Not sure how you are reading the file,

 

It is odd it works for the second line but not the first.

 

I would also try adding a line break in the CSV file on the first line to see if that makes a difference.

 

I thought it might be the character encoding set, but that doesnt really make sense if the second line is interpreted correctly. It's almost like the CA rich text box processing of the returned macro result, is thinking it is part of the rich text encoding.

 

The other thing you could do to check that is to print out the first line's buffer  again, after the good second line is printed

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share