Linefeed character (LF, 0x0A) shown as space (0x20) in View, SUBSTITUTE() explicit newline replaces it successfully

I used OCRTEXT() which appended a LF (0x0A) character to the OCRed string.

In the View (Form) a character was present but was transcoded as a space (0x20).

It seems that explicit comparatives also do the transcode, so that TRIM() would not get rid of the LF and ENDSWITH() did not think it was a space (as expected) but the following did (where " " contains a space):
IF (RIGHT ([OCR Text], 1) = " ",
LEFT([OCR Text], LEN([OCR Text]) -1),
[OCR TEXT]
)

The solution was to check what was being stored at the back end and put an explicit newline in a string substitution as follows:
SUBSTITUTE([OCR Text], "
", โ€œโ€).

Note that Excel column filtering also identified the LF as a space but decoding the string revealed it was a LF.

Iโ€™m concerned that the SUBSTITUTE() may not have consistent behaviour on all browsers/architectures because newline might be CR, LF or CRLF (no idea what happens on real phones), so if anyone can clarify that would be appreciated.

0 1 431
1 REPLY 1

Steve
Platinum 5
Platinum 5

Please contact Support for help with this.

https://www.appsheet.com/Support/Contact

Top Labels in this Space