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

Re: [gopher] CAPS capability: ServerDefaultCharset



On 2015-01-03 17:55, Kim Holviala wrote:
> > 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. 
> 

Out of curiosity, have you made a standalone (iconv-like) tool using the
code you wrote? Even if it is just 80/20, that is something I could use
in some situations.

-- 
Nuno Silva (aka njsg)
Helsinki, Finland

_______________________________________________
Gopher-Project mailing list
Gopher-Project@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/gopher-project

Reply to: