ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [mdk-re] вот гадость какая в expat.
@ 2001-12-25 18:56 AVL
  2001-12-25 19:00 ` [mdk-re] " Aleksey Novodvorsky
  0 siblings, 1 reply; 5+ messages in thread
From: AVL @ 2001-12-25 18:56 UTC (permalink / raw)
  To: mandrake-russian

а через этот парсер xml  все и идет в XRC в wxWindows.

-----------------------------------------------------------
How can I get expat to deal with non-ASCII characters?
By default, expat assumes that documents are encoded in UTF-8. In UTF-8,
ASCII characters are represented by a single byte as they would be in ASCII,
but non-ASCII characters are represented by a sequence of two or more bytes
all with the 8th bit set. The encoding most widely used for European
languages is ISO 8859-1 which is not compatible with UTF-8. To use this
encoding, expat must be told either by supplying an argument of "iso-8859-1"
to XML_ParserCreate, or by starting the document with <?xml version="1.0"
encoding="iso-8859-1"?>.
What encodings does expat support?
expat has built in support for the following encodings:
utf-8
utf-16
iso-8859-1
us-ascii
Additional encodings can be supported by using
XML_SetUnknownEncodingHandler.
----------------------------------------------------------------------------
-----------------

с другой стороы, есть там в исходниках вот что:

ascii.h
------------------------
.....................
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
..................
------------------------

может также можно и cp1251 с koi8-r задать?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [mdk-re] Re: [mdk-re] вот гадость какая в expat.
  2001-12-25 18:56 [mdk-re] вот гадость какая в expat AVL
@ 2001-12-25 19:00 ` Aleksey Novodvorsky
  2001-12-25 19:10   ` [mdk-re] " AVL
  0 siblings, 1 reply; 5+ messages in thread
From: Aleksey Novodvorsky @ 2001-12-25 19:00 UTC (permalink / raw)
  To: mandrake-russian

AVL wrote:

> а через этот парсер xml  все и идет в XRC в wxWindows.
>
> -----------------------------------------------------------
> How can I get expat to deal with non-ASCII characters?
> By default, expat assumes that documents are encoded in UTF-8. In UTF-8,
>

<skip>

>
>
> может также можно и cp1251 с koi8-r задать?

А это нужно?
"Правильная" кодировка для XML -- utf8.

Rgrds, AEN






^ permalink raw reply	[flat|nested] 5+ messages in thread

* [mdk-re] Re: [mdk-re] Re: [mdk-re] вот гадость какая в expat.
  2001-12-25 19:00 ` [mdk-re] " Aleksey Novodvorsky
@ 2001-12-25 19:10   ` AVL
  2001-12-25 19:21     ` Aleksey Novodvorsky
  0 siblings, 1 reply; 5+ messages in thread
From: AVL @ 2001-12-25 19:10 UTC (permalink / raw)
  To: mandrake-russian

> > может также можно и cp1251 с koi8-r задать?
>
> А это нужно?
> "Правильная" кодировка для XML -- utf8.

вот и я так думаю.
вопрос такой. если я запишу текст в xml в utf-8, это будет работать в разных
локалях?
и второй вопрос, переводить в utf лучше всего iconv?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [mdk-re] Re: [mdk-re] Re: [mdk-re]  вот гадость какая в  expat.
  2001-12-25 19:10   ` [mdk-re] " AVL
@ 2001-12-25 19:21     ` Aleksey Novodvorsky
  2001-12-25 19:39       ` [mdk-re] " AVL
  0 siblings, 1 reply; 5+ messages in thread
From: Aleksey Novodvorsky @ 2001-12-25 19:21 UTC (permalink / raw)
  To: mandrake-russian

AVL wrote:

> > > может также можно и cp1251 с koi8-r задать?
> >
> > А это нужно?
> > "Правильная" кодировка для XML -- utf8.
>
> вот и я так думаю.
> вопрос такой. если я запишу текст в xml в utf-8, это будет работать в разных
> локалях?

Это зависит от приложения. В правильном приложении -- будет.

>
> и второй вопрос, переводить в utf лучше всего iconv?

Да.

Rgrds, AEN





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [mdk-re] Re: [mdk-re] Re: [mdk-re] Re: [mdk-re] вот гадость какая в expat.
  2001-12-25 19:21     ` Aleksey Novodvorsky
@ 2001-12-25 19:39       ` AVL
  0 siblings, 0 replies; 5+ messages in thread
From: AVL @ 2001-12-25 19:39 UTC (permalink / raw)
  To: mandrake-russian

----- Original Message -----
From: "Aleksey Novodvorsky" <aen@altlinux.ru>
To: <mandrake-russian@altlinux.ru>
Sent: Tuesday, December 25, 2001 7:38 PM
Subject: Re: [mdk-re] Re: [mdk-re] Re: [mdk-re] вот гадость какая в expat.


> AVL wrote:
>
> > > > может также можно и cp1251 с koi8-r задать?
> > >
> > > А это нужно?
> > > "Правильная" кодировка для XML -- utf8.
> >
> > вот и я так думаю.
> > вопрос такой. если я запишу текст в xml в utf-8, это будет работать в
разных
> > локалях?
>
> Это зависит от приложения. В правильном приложении -- будет.

пример из поставки wxwindows- неправильный ;)
при попытке вписать utf-8  в файл ресурсов видим отсутствие перекодировки из
utf-8 в кодировку локали.
но хоть направление ясно.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-25 19:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-25 18:56 [mdk-re] вот гадость какая в expat AVL
2001-12-25 19:00 ` [mdk-re] " Aleksey Novodvorsky
2001-12-25 19:10   ` [mdk-re] " AVL
2001-12-25 19:21     ` Aleksey Novodvorsky
2001-12-25 19:39       ` [mdk-re] " AVL

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