[5.10 b3] ReadProgramString()
Posted: Sat Jan 12, 2013 2:32 pm
This is kind of a bug...
To replicate try using Sox for windows, it's output seems to be ascii. ( http://sox.sourceforge.net/ )
If PureBasic is set to create a unicode program then the string returned with ReadProgramString() is cut off.
Compiling as Ascii and all is fine. But I assume a Ascii PB program would have issues with a unicode program outputting to stdout.
Possible solution?
Either make ReadProgramString() automatically convert the string,
or add a flag option to ReadProgramString() similar to PeekS().
WriteProgramString() might need a flag as well.
Ideally ReadProgramString() would be automatic and WriteProgramString() with a optional flag.
Also note that ReadProgramError() probably have the same ascii/unicode issue.
No idea if the same issue exists for Mac or Linux.
EDIT: Changed title as this is true for b3 as well.
PS! I'm trying to use the stats option in Sox which outputs audio stats to stderr (as ascii, yep, outch)
To replicate try using Sox for windows, it's output seems to be ascii. ( http://sox.sourceforge.net/ )
If PureBasic is set to create a unicode program then the string returned with ReadProgramString() is cut off.
Compiling as Ascii and all is fine. But I assume a Ascii PB program would have issues with a unicode program outputting to stdout.
Possible solution?
Either make ReadProgramString() automatically convert the string,
or add a flag option to ReadProgramString() similar to PeekS().
WriteProgramString() might need a flag as well.
Ideally ReadProgramString() would be automatic and WriteProgramString() with a optional flag.
Also note that ReadProgramError() probably have the same ascii/unicode issue.
No idea if the same issue exists for Mac or Linux.
EDIT: Changed title as this is true for b3 as well.
PS! I'm trying to use the stats option in Sox which outputs audio stats to stderr (as ascii, yep, outch)