ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux general discussion list <community@lists.altlinux.org>
Subject: Re: [Comm] TZ: number 2 RU_string
Date: Wed, 8 Mar 2006 19:43:50 +0300
Message-ID: <20060308164350.GA10217@basalt.office.altlinux.org> (raw)
In-Reply-To: <op.s53wlqiamb8vzs@oc.peooc.net>

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

On Wed, Mar 08, 2006 at 06:06:52PM -0000, Aleksander N.Gorohovski wrote:
> И ещё, может кто подскажет, как по грамотному определить текущую кодировку?

Вот пример на C (хотя зачем вам определять кодировку, непонятно):

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <locale.h>
#include <langinfo.h>

int
main()
{
	(void) setlocale(LC_ALL, "");
	{
		char   *p, *c = nl_langinfo(CODESET);

		if (!(c && *c))
			c = "iso-8859-1";
		c = strdup(c);
		for (p = c; *p; ++p)
			*p = tolower(*p);
		puts(c);
	}
	return 0;
}


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

  parent reply	other threads:[~2006-03-08 16:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 18:06 Aleksander N.Gorohovski
2006-03-08 16:09 ` Andrey Rahmatullin
2006-03-08 18:19   ` Aleksander N.Gorohovski
2006-03-08 16:18     ` Andrey Rahmatullin
2006-03-08 18:44       ` Aleksander N.Gorohovski
2006-03-08 16:44         ` Andrey Rahmatullin
2006-03-08 16:32 ` Evgenii Terechkov
2006-03-08 19:35   ` Aleksander N.Gorohovski
2006-03-08 17:55     ` Evgenii Terechkov
2006-03-08 16:43 ` Dmitry V. Levin [this message]
2006-03-08 17:02 ` Sergey Lizogub
2006-03-08 20:10   ` Aleksander N.Gorohovski
2006-03-08 22:44 ` Vitaly Lipatov
2006-03-09 11:43 ` Michael Shigorin
2006-03-09 19:02   ` Aleksander N.Gorohovski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060308164350.GA10217@basalt.office.altlinux.org \
    --to=ldv@altlinux.org \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git