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

Re: [gopher] CAPS capability: ServerDefaultCharset



> On 03 Jan 2015, at 14:51, James Mills <prologic@shortcircuit.net.au> wrote:
> 
> This is really neat :) How do you "detect" the file's encoding btw?

It doesn’t detect the file encoding, it detects encoding per character on the fly. As in you can have both Latin-1 and UTF-8 on the same line in the same file and it will still do the right thing.

Look at the function strniconv() on string.c line 144. Not the easiest to understand because it has lots of bit handling - you should probably read & fully understand some UTF-8 docs before trying to figure out what my code does and why it works the way it does.



- Kim



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

Reply to: