[5.40]RunProgram() with #PB_UTF8
Posted: Tue Nov 17, 2015 12:27 am
Hi,
just a short bugreport, because it's late here:
When using RunProgram() in an unicode exectuable and you read data from stdin, it's interpreting everything as UTF-8.
That's nice, but the strange part is, that if you add the flag #PB_Program_UTF8 the functions seems to treat the data as #PB_Unicode and vice versa.
A simple example:
just a short bugreport, because it's late here:
When using RunProgram() in an unicode exectuable and you read data from stdin, it's interpreting everything as UTF-8.
That's nice, but the strange part is, that if you add the flag #PB_Program_UTF8 the functions seems to treat the data as #PB_Unicode and vice versa.
A simple example:
Code: Select all
Program = RunProgram("Someprogram.exe", "", "", #PB_Program_Open | #PB_Program_Read) ; Standard string format is UTF-8, as expected
Program = RunProgram("Someprogram.exe", "", "", #PB_Program_Open | #PB_Program_Read | #PB_Ascii) ; Standard string format is ASCII, as expected
Program = RunProgram("Someprogram.exe", "", "", #PB_Program_Open | #PB_Program_Read | #PB_UTF8) ; Standard string format is #PB_Unicode
Program = RunProgram("Someprogram.exe", "", "", #PB_Program_Open | #PB_Program_Read | #PB_Unicode) ; Standard string format is UTF-8