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

Re: Translators! What's your charset?



Craig Small:

> No I need to know what characters are in a word.

$ cat << EOM > word.c
#include <locale.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    int i;

    if (2 == argc)
    {
     	setlocale(LC_ALL, argv[1]);
    }

    for (i = 32; i <= 256; i ++)
    {
     	if (isalnum(i))
	{
            putchar(i);
	}
    }

    putchar('\n');

    return 0;
}
EOM
$ make word
$ word sv_SE
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz­ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ

-- 
\\//
peter - http://www.softwolves.pp.se/

  Statement concerning unsolicited e-mail according to Swedish law:
  http://www.softwolves.pp.se/peter/reklampost.html




Reply to: