[racket] current-output encoding

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Tue Mar 26 12:25:50 EDT 2013

On Tue, Mar 26, 2013 at 5:00 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> I think you want `reencode-output-port', probably using "" (which
> represents the user's default encoding) as the target encoding.

I tried the following:

====
#lang racket

(current-output-port (reencode-output-port (current-output-port) ""))

(display "à")
====

but this displays nothing both in DrRacket and in the console.
Also "program >tempfile" from the console produces a file of length 0.

Am I misunderstanding the use of reencode-output-port?


Posted on the users mailing list.