I’m trying to create an ASCII file for an external party within our application. Not a problem there. The problem is that each field has a fixed length. If a field has a lesser length, I must use spaces as filler. The problem is that no matter what I try when I have to do this, is that I end up with one space. When I use a ‘^’ as filler, it all goes well, so I know that the code is OK. My question: how can I use a space as filler in an ASCII file? I’ve tried CHR(32), ’ ’ etc., but nothing seems to work. The relevant part of my code (with ^ as space):
Thank you very much! This was the way to the solution. It was set to “SMART” management, which meant that every following whitespace would be removed. Setting this to “no whitespace management” fixed the problem immediately. Thanks again!
Thank you for your answer. You probably already had you whitespace management set to “NO”, that’s why this worked for you. For me, I first needed to change this, and then it worked. You are however right. Windows-1252 is not a valid type, only a valid character encoding value.
You can also keep the Smart Whitespace Management on and wrap your preformatted text with one of the three tags that disable it temporarily: “code”, “pre”, “textarea”
I used trycf.com to test, so yeah they probably have the default setting of no whitespace management, I hadn’t thought of that Good to hear you got it working!
BTW – If the tags interfere with your HTML, you can probably (I haven’t looked in a long time) open one of those tags in an HTML comment. The Whitespace Manager doesn’t care that it’s inside a comment, so putting something like
<!-- <pre> !-->
somewhere, will preserve all of the whitespace after it (unless encountered by a closing pre tag.
The browser will of course ignore it as it is in a comment.