Is it possible to make your own byte encoder? Section 4.5.4 of the reference talks about them and describes the handful of built-in ones. I don't see a way of making my own byte encoders, though. I'd like to have my own way of validating bytes and performing replacements, similar to what is done with the "UTF-8-permissive" encoder (for example, certain junk characters get replaced by #\uFFFD), but I'd like to do a bit more than that. For example, I'd like replace some exotic but otherwise valid UTF-8 characters with #\uFFFD. It seems that the only way to do that is to write my own custom input (or output) port, with the validation/replacement logic contained within the custom port's peek/read-bytes/write-bytes procedures. Or perhaps I overlooking something?
Jesse -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/4a8c8030-b2f7-46fa-80ca-df425c6bda7an%40googlegroups.com.