summaryrefslogtreecommitdiff
path: root/module/rnrs
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-01-15 14:31:49 +0100
committerAndy Wingo <wingo@pobox.com>2013-01-15 16:32:17 +0100
commit93c4fa21745d31812b2f5a225f407e5f1b0e3665 (patch)
treecb1c09657c2a94e88bc6549339a6e9be23bc28aa /module/rnrs
parent08467a7e6116de5e21e9622b79657e113ce4b072 (diff)
downloadguile-93c4fa21745d31812b2f5a225f407e5f1b0e3665.tar.gz
Port encodings are case-insensitive, but normalized to upper-case.
* libguile/ports.c (ascii_toupper, encoding_matches) (canonicalize_encoding): New helpers. (scm_c_make_port_with_encoding): (scm_i_set_default_port_encoding): (scm_i_set_port_encoding_x): Use the new helpers to be case-insensitive and also to canonicalize the internal representation to upper-case ASCII names. (scm_i_default_port_encoding): Never return NULL. (scm_port_encoding): The encoding is always a string. * libguile/read.c (scm_i_scan_for_encoding): Use a locale-independent check instead of isalnum. Don't upcase the result: the port code will handle that. * test-suite/tests/web-response.test ("example-1"): Adapt test to expect normalized (upper-case) encoding for the response port.
Diffstat (limited to 'module/rnrs')
0 files changed, 0 insertions, 0 deletions