ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@mivlgu.murom.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] Re: XML parser encodings
Date: Thu Nov 15 17:37:27 2001
Message-ID: <20011115175409.122d1e43.vsu@mivlgu.murom.ru> (raw)
In-Reply-To: <20011114235900.GL1995@localhost.localdomain>

On Thu, 15 Nov 2001 02:59:00 +0300
Mikhail Zabaluev <mhz@alt-linux.org> wrote:

> > Лучше посмотреть на реализацию функции g_convert_with_fallback()
> > в GLib-1.3.x (pre-2.0) - там переносимая реализация. Основной
> > принцип - при ошибке преобразования исходная строка
> > преобразуется в UTF-8 (что должно пройти в любом случае), а
> > затем производится посимвольное преобразование из UTF-8 в
> > требуемую кодировку, с заменой символов, которые не удается
> > преобразовать.
> 
> Сие грамотно, разве что так тщательно нужно перекодировать только то
> место, где iconv спотыкается -- ведь функция сама двигает указатели,
> пока все OK.

В общем случае это не проходит - исходная кодировка может быть
хитрой многобайтовой, поэтому пропустить мешающий символ сложно.
В UTF-8 такой проблемы нет. Впрочем, все это используется только
если строка не перекодировалась напрямую.



  reply	other threads:[~2001-11-15 17:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12  8:05 ` Oleg A. Paraschenko
2001-11-12 12:39   ` Alexander Bokovoy
2001-11-13  1:40     ` Mikhail Zabaluev
2001-11-13 12:48       ` Alexander Bokovoy
2001-11-13 20:30       ` Alexei Takaseev
2001-11-13 20:38         ` Alexander Bokovoy
2001-11-13 20:47           ` [mdk-re] iconv -r ôÕÒÂÉÎ áÌÅËÓÅÊ
2001-11-13 20:49           ` [mdk-re] Re: XML parser encodings Sergey Vlasov
2001-11-13 21:00             ` Alexander Bokovoy
2001-11-15  2:48             ` Mikhail Zabaluev
2001-11-15 17:37               ` Sergey Vlasov [this message]
2001-11-16 12:27                 ` Mikhail Zabaluev
2001-11-16 12:51                   ` Mikhail Zabaluev
2001-11-13 20:50         ` Aleksey Novodvorsky
2001-11-13 21:06           ` Dmitry V. Levin
2001-11-13 21:23             ` John Profic
2001-11-14  7:02         ` Yura Gusev
2001-11-15  2:50           ` Mikhail Zabaluev

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=20011115175409.122d1e43.vsu@mivlgu.murom.ru \
    --to=vsu@mivlgu.murom.ru \
    --cc=mandrake-russian@altlinux.ru \
    /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