[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [gopher] CAPS capability: ServerDefaultCharset



> On 03 Jan 2015, at 17:49, Nuno Silva <nunojsilva@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
_______________________________________________
Gopher-Project mailing list
Gopher-Project@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project

Reply to: