Hi all!
Is it possible to change the stdout port settings at runtime? I would like to be able to output some utf strings without having to start gambit with the utf-8 flag when launching gsi/gsc... is this possible?
Thanks ^_^Y
David
Afficher les réponses par date
On 16-Jul-09, at 12:16 PM, David St-Hilaire wrote:
Hi all!
Is it possible to change the stdout port settings at runtime? I would like to be able to output some utf strings without having to start gambit with the utf-8 flag when launching gsi/gsc... is this possible?
Try:
(port-settings-set! ##stdout-port (list char-encoding: 'UTF-8))
Note: if you really want the "console port" then use (console-port) instead of ##stdout-port.
Note 2: I guess it is time to add procedures to get the stdin/stdout/ stderr, e.g. (stdout-port) to get the standard output. Do other Scheme implementations have an established naming convention for these procedures?
Marc
Marc Feeley wrote:
On 16-Jul-09, at 12:16 PM, David St-Hilaire wrote:
Hi all!
Is it possible to change the stdout port settings at runtime? I would like to be able to output some utf strings without having to start gambit with the utf-8 flag when launching gsi/gsc... is this possible?
Try:
(port-settings-set! ##stdout-port (list char-encoding: 'UTF-8))
Note: if you really want the "console port" then use (console-port) instead of ##stdout-port.
Note 2: I guess it is time to add procedures to get the stdin/stdout/stderr, e.g. (stdout-port) to get the standard output. Do other Scheme implementations have an established naming convention for these procedures?
Marc
Thanks Marc! :)
David