[Csnd] How to print a Carriage Return in a printks string - Android?
Date | 2020-10-19 21:08 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | [Csnd] How to print a Carriage Return in a printks string - Android? |
Any idea why \r (a simple carriage return) is ignored in Android Csound (as well as its ASCII equivalents)? \r works fine in console Csound.
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
I want to reprint/update a single line of text every second with printks. Is there possibly another way of doing this in Android? Art Hunkins |
Date | 2020-10-20 08:26 |
From | 00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE |
Subject | Re: [Csnd] How to print a Carriage Return in a printks string - Android? |
does \n works?
|
Date | 2020-10-20 13:36 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] How to print a Carriage Return in a printks string - Android? |
I thought carriage was a windows only thing. But they \r\n usually come in pairs in windows files afaik. Could be BOM needs to be added too for the carriages to be interpreted correctly. But BOM chars are hell to deal with. On Tue, 20 Oct 2020 at 09:26, <00000008a49663bc-dmarc-request@listserv.heanet.ie> wrote:
|
Date | 2020-10-20 17:22 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] How to print a Carriage Return in a printks string - Android? |
Yes, but apparently \n is the only ASCII escape sequence that *does* work in Android. Unfortunately \n includes a newline which I'd rather not have. On Tue, Oct 20, 2020 at 3:27 AM <00000008a49663bc-dmarc-request@listserv.heanet.ie> wrote:
|
Date | 2020-10-20 18:02 |
From | Arthur Hunkins <000001e1d761dea2-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] How to print a Carriage Return in a printks string - Android? |
Any idea as to how a BOM might implement a carriage return for possible use in printks (on Android)? I've tried \u000D (\\u000D) and \x0D (\\x0D) and they don't work. I've also investigated \b (\x08) - backspace, which also gives no joy. On Tue, Oct 20, 2020 at 8:36 AM Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
|
Date | 2020-10-20 18:22 |
From | Justin Smith |
Subject | Re: [Csnd] How to print a Carriage Return in a printks string - Android? |
BOM is a marker used at the very beginning of unicode documents to differentiate how a document should be decoded. Many subtle string parsing bugs can be caused by unexpected / misplaced BOM characters. BOM is totally irrelevant to the question of \r\n vs. \n for line endings. I wouldn't expect Android on a system level to ever use WIndows line ending conventions (though some text processing applications might do so...). https://en.wikipedia.org/wiki/Byte_order_mark On Tue, Oct 20, 2020 at 10:02 AM Arthur Hunkins <000001e1d761dea2-dmarc-request@listserv.heanet.ie> wrote: > > Any idea as to how a BOM might implement a carriage return for possible use in printks (on Android)? > > I've tried \u000D (\\u000D) and \x0D (\\x0D) and they don't work. I've also investigated \b (\x08) - backspace, which also gives no joy. > > Art Hunkins > http://www.arthunkins.com > > > On Tue, Oct 20, 2020 at 8:36 AM Hlöðver Sigurðsson |