Re: [Oorexx-devel] Question ad Write{Output|Error}Buffer

2022-08-19 Thread Erich Steinböck
>
> how about using WriteOutput()/WriteError() to supply binary data?

WriteOutput and WriteError write the supplied data unmodified to any
redirection object.
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad Write{Output|Error}Buffer

2022-08-18 Thread Rony G. Flatscher

On 18.08.2022 12:24, Rick McGuire wrote:

The data written is split at linend boundaries.


Thank you for the clarification!

One remark ad codepage here (as Strings in Java are always codepage related): if there is UTF-16 or 
UTF-32 text exchanged then it may be the case that LF and CR-LF characters are not correct. Here a 
rexxtry session:


   call bsf.cls
  ... rexxtry.rex on WindowsNT
   lf="0d0a"x;a="one"lf"two";say a; say a~c2x
   one
   two
   6F6E65*0D0A*74776F
  ... rexxtry.rex on WindowsNT
   b=bsf.iconv(a, "CP437", "UTF-16")
  ... rexxtry.rex on WindowsNT
   say b;say b~c2x
   o n e
 t w o
   FEFF006F006E0065*000D000A*00740077006F
  ... rexxtry.rex on WindowsNT
   d=bsf.iconv(a, "CP437", "UTF-32")
  ... rexxtry.rex on WindowsNT
   say d;say d~c2x
   o   n   e
   t   w   o
   006F006E0065*000D000A*00740077006F
  ... rexxtry.rex on WindowsNT

With UTF-8 this would not be a problem:

   say c;say c~c2x
   one
   two
   6F6E65*0D0A*74776F
  ... rexxtry.rex on WindowsNT

---

Would you think it to be feasible at this time to have also "raw" versions like ReadInputBufferRaw, 
WriteOutputBufferRaw, WriteErrorBufferRaw such that one could process and produce binary data 
exploiting the new redirecting command handlers?


---rony




On Thu, Aug 18, 2022 at 6:01 AM Rony G. Flatscher  
wrote:

The Write{Output|Error}Buffer API states:

Adds a string composed of strings separated by the platform-specfic 
line-end characters as
separate
items or lines to an output redirection Rexx object that was specified 
using the WITH
subkeyword of
an ADDRESS instruction.

Is there any processing done on the received data or does the 
Write{Output|Error}Buffer-API
just take the receive data as is and place it as a single item to the 
output sink? In this
case it would become possible to produce binary data as a result of a 
command (and will
motivate the need of an additional API on the Java side to become able to 
distinguish between
Strings (Reader,Writer, codepage dependent) and Streams (byte oriented, raw 
data)).

---rony

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad Write{Output|Error}Buffer

2022-08-18 Thread Rick McGuire
The data written is split at linend boundaries.

Rick

On Thu, Aug 18, 2022 at 6:01 AM Rony G. Flatscher 
wrote:

> The Write{Output|Error}Buffer API states:
>
> Adds a string composed of strings separated by the platform-specfic
> line-end characters as separate
> items or lines to an output redirection Rexx object that was specified
> using the WITH subkeyword of
> an ADDRESS instruction.
>
> Is there any processing done on the received data or does the
> Write{Output|Error}Buffer-API just take the receive data as is and place it
> as a single item to the output sink? In this case it would become possible
> to produce binary data as a result of a command (and will motivate the need
> of an additional API on the Java side to become able to distinguish between
> Strings (Reader,Writer, codepage dependent) and Streams (byte oriented, raw
> data)).
>
> ---rony
>
> ___
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


[Oorexx-devel] Question ad Write{Output|Error}Buffer

2022-08-18 Thread Rony G. Flatscher

The Write{Output|Error}Buffer API states:

   Adds a string composed of strings separated by the platform-specfic line-end 
characters as separate
   items or lines to an output redirection Rexx object that was specified using 
the WITH subkeyword of
   an ADDRESS instruction.

Is there any processing done on the received data or does the Write{Output|Error}Buffer-API just 
take the receive data as is and place it as a single item to the output sink? In this case it would 
become possible to produce binary data as a result of a command (and will motivate the need of an 
additional API on the Java side to become able to distinguish between Strings (Reader,Writer, 
codepage dependent) and Streams (byte oriented, raw data)).


---rony

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel