[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Letter-case conversions in network protocols
From: |
Lars Ingebrigtsen |
Subject: |
Re: Letter-case conversions in network protocols |
Date: |
Sat, 08 May 2021 21:45:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Daniel Martín <mardani29@yahoo.es> writes:
> Of course, code can still be broken if people explicitly do its own
> thing with `downcase', etc. instead of using the case-folding string
> APIs, but that's sort of an anti-pattern, anyway.
But code does this sort of thing -- for instance, Message allows headers
to be specified in various ways, but will run the header names trough
`capitalize'.
So this isn't just about doing comparisons, but separating out text
transformations that are done according to a protocol specification
(i.e., octets that happen to be ASCII) vs. the normal DWIM text
transformations.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no