Replace not work with \r\n

I checked out Kodular Fenix (v1.5.0) Bug Tracker before creating a new topic

Describe your issue

I’m trying to do a replace where \ r \ n appear but it doesn’t work … it doesn’t do anything … any ideas? Thank you

Steps to reproduce the issue

Expected Behaviour

Actual Behaviour

Show your Blocks

Android version

9

Can you post the response content in order to see the problem ?

1 Like

Sure!

It’s OCR return, for example:

{“ParsedResults”:[{“TextOverlay”:{“Lines”:,“HasOverlay”:false,“Message”:“Text overlay is not provided as it is not requested”},“TextOrientation”:“0”,“FileParseExitCode”:1,“ParsedText”:“All Components v\r\nResultados\r\nImaãev\r\nO Horizontal_Arrange…\r\nSpacel\r\nSpoce2\r\nText_Boxl\r\nTaiFunjmagel\r\nweb!\r\n14.0\r\nFont\r\nDefault\r\nWidth —\r\n”,“ErrorMessage”:"",“ErrorDetails”:""}],“OCRExitCode”:1,“IsErroredOnProcessing”:false,“ProcessingTimeInMilliseconds”:“328”,“SearchablePDFURL”:“Searchable PDF not generated as it was not requested.”}

Then, Texto_del_OCR is : All Components v\r\nResultados\r\nImaãev\r\nO Horizontal_Arrange…\r\nSpacel\r\nSpoce2\r\nText_Boxl\r\nTaiFunjmagel\r\nweb!\r\n14.0\r\nFont\r\nDefault\r\nWidth —\r\n

Thanks!

For me it works. Since I didn’t have the actual response content I used the above example and in one label I added original text and in another I replaced \r\n. Then I checked whether each label’s text contain \r\n. Test on android 9

I can reproduce what you put and it works, but not in my code … I guess the response is a JSON and not a string … Can I convert the JSON to String?

Thank you

Using web component

image

If I add that,

then I get this error:

Some idea?

Thanks

Try this

El mismo error, solo desaparece cuando quito el Web1 JSON component…

Some idea for access to “ParsedText” on :

{“ParsedResults”:[{“TextOverlay”:{“Lines”:,“HasOverlay”:false,“Message”:“Text overlay is not provided as it is not requested”},“TextOrientation”:“0”,“FileParseExitCode”:1,“ParsedText”:“All Components v\r\nResultados\r\nImaãev\r\nO Horizontal_Arrange…\r\nSpacel\r\nSpoce2\r\nText_Boxl\r\nTaiFunjmagel\r\nweb!\r\n14.0\r\nFont\r\nDefault\r\nWidth —\r\n”,“ErrorMessage”:"",“ErrorDetails”:""}],“OCRExitCode”:1,“IsErroredOnProcessing”:false,“ProcessingTimeInMilliseconds”:“328”,“SearchablePDFURL”:“Searchable PDF not generated as it was not requested.”}

Regards and thanks again.

If you wish post a test aia or pm me in order to check it