[gopher] CAPS capability: ServerDefaultCharset
Kim Holviala
kim at holviala.com
Sat Jan 3 15:55:09 UTC 2015
> On 03 Jan 2015, at 17:49, Nuno Silva <nunojsilva at ist.utl.pt> wrote:
>
> You mean Gophernicus can even handle both ISO-8859-1 and UTF-8 if
> they're mixed inside the *same* document? That's neat! (And it also
> degrades in a nice way!)
Yep, it works even if they are used within a single line of text. I first tried to use the GNU iconv() but that function was just incredibly stupid so I wrote my own. While writing it I realized I can just autodetect all input on char-by-char basis, skip most of the “offical” conversion tables and just focus on US-ASCII/Latin-1/first plane of UTF-8. My strniconv() is purely a 80/20 implementation, and that’s good enough for me.
- Kim
More information about the Gopher-Project
mailing list