Bug #9535
Empty whitespace is added when the output is redirected to a file
0%
History
#1 Updated by Lorian Sandu over 1 year ago
Example:
output to text.tst. form "test" with frame f-blank no-box no-labels. display "Asd" with frame f-blank.
| 4GL | FWD |
|---|---|
testAsd |
test Asd |
As it can be seen, in FWD there is an empty space between test and Asd.
I tested the same scenario but without redirecting the output to a file and indeed, there is a white space between the two words, both in 4GL and FWD.
The only difference is when the ouput is redirected, as in 4GL there is no white space added.
#3 Updated by Lorian Sandu over 1 year ago
I noticed some WEIRD behavior of OE .
Look at this example :
output to text.tst. form "qwer" with frame f-blank no-box no-labels. display "Asd" with frame f-blank.
| 4GL |
|---|
qwer Asd |
The only difference from the example in #9535-1 is the string of the form ("test" -> "qwer"). Even though they have the same length, in this case OE decides to put an empty space after it.
#4 Updated by Greg Shah over 1 year ago
Hmmm. That is a ridiculous quirk.
I've checked as well. Some single character changes in the 1st or 4th position (such as "tesd" instead of "test") and even changing the order of the characters "etst" instead of "test") will yield a result with no spaces. But if the 4 character string literal begins and ends with "t" or "-", then in most cases it triggers this weirdness. And in some cases it even drops more than 1 character. It looks like OE has a quirk hard coded in the case that there is a string literal "txxt" or "-xx-" (where x can be most lowercase characters) as a widget in redirected mode. It is really more complicated than even that description. It can also happen for smaller or later triggering string literals ("---" or "testt").
I will say this this is a frame layout quirk. It happens when the "triggering literal" appear somewhere in the frame definition but that can be in a FORM, DEFINE FRAME, DISPLAY (and maybe others).
output to some_string_literals_cause_frame_layout_quirks.out. // other variants to add: // - non-triggering literals following or preceding // - database fields // - less than 3 and more than 5 character triggering literals def var x as char init "CONTENT" label "2nd Field". def var y as char init "OTHER" label "1st Field". form "test" with frame t1 title "---Test 1---". display x with frame t1. form "tedt" with frame t2 title "---Test 2---". display x with frame t2. form "tset" with frame t3 title "---Test 3---". display x with frame t3. form "TEST" with frame t4 title "---Test 4---". display x with frame t4. form "Test" with frame t5 title "---Test 5---". display x with frame t5. form "tesT" with frame t6 title "---Test 6---". display x with frame t6. form "TesT" with frame t7 title "---Test 7---". display x with frame t7. form "tEst" with frame t8 title "---Test 8---". display x with frame t8. form "teSt" with frame t9 title "---Test 9---". display x with frame t9. form "tESt" with frame t10 title "---Test 10---". display x with frame t10. form "taat" with frame t11 title "---Test 11---". display x with frame t11. form "tAAt" with frame t12 title "---Test 12---". display x with frame t12. form "tttt" with frame t13 title "---Test 13---". display x with frame t13. form "t--t" with frame t14 title "---Test 14---". display x with frame t14. form "tXXt" with frame t15 title "---Test 15---". display x with frame t15. form "txxt" with frame t16 title "---Test 16---". display x with frame t16. form y "test" with frame t17 title "---Test 17---". y:screen-value in frame t17 = y. display x with frame t17. form "test" y with frame t18 title "---Test 18---". y:screen-value in frame t18 = y. display x with frame t18. form y with frame t19 title "---Test 19---". y:screen-value in frame t19 = y. display "test" x with frame t19. form y with frame t20 title "---Test 20---". y:screen-value in frame t20 = y. display "test" with frame t20. form y with frame t21 title "---Test 21---". y:screen-value in frame t21 = y. display x "test" with frame t21. define frame t22 y with title "---Test 22---". y:screen-value in frame t22 = y. display x "test" with frame t22. form "tet" with frame t23 title "---Test 23---". display x with frame t23. form "testt" with frame t24 title "---Test 24---". display x with frame t24. form "---" with frame t25 title "---Test 25---". display x with frame t25. form "----" with frame t26 title "---Test 26---". display x with frame t26. form "-----" with frame t27 title "---Test 27---". display x with frame t27. form "-es-" with frame t28 title "---Test 28---". display x with frame t28. form "-es--" with frame t29 title "---Test 29---". display x with frame t29. form "ttttt" with frame t30 title "---Test 30---". display x with frame t30. output close.
Has this output:
---Test 1---
2nd Field-----
testCONTENT
---Test 2---
2nd Field-----
tedtCONTENT
---Test 3---
2nd Field-----
tsetCONTENT
---Test 4---
2nd Field-----
TEST CONTENT
---Test 5---
2nd Field-----
Test CONTENT
---Test 6---
2nd Field-----
tesT CONTENT
---Test 7---
2nd Field----
TesT CONTENT
---Test 8---
2nd Field-----
tEstCONTENT
---Test 9---
2nd Field-----
teStCONTENT
---Test 10---
2nd Field----
tESt CONTENT
---Test 11---
2nd Field-----
taatCONTENT
---Test 12---
2nd Field----
tAAt CONTENT
---Test 13---
2nd Field-----
tttCONTENT
---Test 14---
2nd Field-----
t--CONTENT
---Test 15---
2nd Field----
tXXt CONTENT
---Test 16---
2nd Field-----
txxtCONTENT
---Test 17---
1st Field----- 2nd Field----
OTHER test CONTENT
---Test 18---
1st Field----- 2nd Field----
testOTHER CONTENT
---Test 19---
1st Field----- 2nd Field----
OTHER test CONTENT
---Test 20---
1st Field-----
OTHER test
---Test 21---
1st Field-----2nd Field------
OTHER CONTENT test
---Test 22---
1st Field-----2nd Field------
OTHER CONTENT test
---Test 23---
2nd Field-----
tetCONTENT
---Test 24---
2nd Field----
testtCONTENT
---Test 25---
2nd Field-----
--CONTENT
---Test 26---
2nd Field-----
---CONTENT
---Test 27---
2nd Field----
----CONTENT
---Test 28---
2nd Field-----
-es-CONTENT
---Test 29---
2nd Field----
-es--CONTENT
---Test 30---
2nd Field----
ttttCONTENT
Unless someone has a reason that this makes sense, I'm inclined to treat this as an unimplemented quirk.