3 Aug 2004 alejandro   » (Master)

SAMBA and iconv

I have been playing with iconv (not the libiconv one, else the integrated in glibc) to convert the SAMBA strings encoded into UCS to the current locale, so it shows well the registered files to syslog without odd chars. For the current locale implementation I've tested first the nllanginfo(CODESET) function but I had some troubles getting used locales so I have done an easy little program that gets the LC_ALL, LC_TYPE and LANG env vars and then gives the locale to a convert program (the iconv one).

Anyway I think the samba-vscan modules will have the same trouble when registers messages with not-known characters with syslog because is printing the Samba provided information in UCS.

GCC

The known problems in the sockets communication was solved, now the G++ compiler is more strict (was introduced the new C++ parser in GCC 3.3) and when you do a cast with a reference first you have to do the cast and then the reference. For example that kind of things the C Compiler let to do it in C and in the G++ 3.2 version, at least is finally solved now in the code.

Arandano

David Waite finished the encoder last night and tons of unit tests. The encoder parses .torrent files and allows to generate .torrent files.

In a torrent file there are four data types within torrent files strings, long integers, lists, and maps. They all have a format, lists and maps can nest so a torrent has a document object model of these four types. So there is a dictionary at top, and it has an entry called 'info' which is another dictionary and one called files which is a list of dictionaries, each representing data about a file within the torrent. David is going to make an actual file type and parser, but things seem very free-form and we wouldn't want to break if someone encoded a torrent with an experimental bittorrent fork which added additional data.

When I talk about a Document Object Model is not really an XML but one of the bittorrent libraries for java allows to save as xml.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!