postgresql/src/backend/utils/mb
Teodor Sigaev 32032d42b5 Fix usage of char2wchar/wchar2char. Changes:
- pg_wchar and wchar_t could have different size, so char2wchar
  doesn't call pg_mb2wchar_with_len to prevent out-of-bound
  memory bug
- make char2wchar/wchar2char symmetric, now they should not be
  called with C-locale because mbstowcs/wcstombs oftenly doesn't
  work correct with C-locale.
- Text parser uses pg_mb2wchar_with_len directly in case of
  C-locale and multibyte encoding

Per bug report by Hiroshi Inoue <inoue@tpf.co.jp> and
following discussion.

Backpatch up to 8.2 when multybyte support was implemented in tsearch.
2009-03-02 15:10:09 +00:00
..
Unicode Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
conversion_procs Fix buffer allocations in encoding conversion routines so that they won't 2009-02-28 18:49:42 +00:00
Makefile Refactor backend makefiles to remove lots of duplicate code 2008-02-19 10:30:09 +00:00
README Add URL for introduction to multibyte programming in C. 2008-06-17 18:22:43 +00:00
conv.c Update copyright for 2009. 2009-01-01 17:24:05 +00:00
encnames.c Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
iso.c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
mbutils.c Fix usage of char2wchar/wchar2char. Changes: 2009-03-02 15:10:09 +00:00
wchar.c Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
win866.c Rename canonical encodings, per Peter: 2005-03-07 04:30:55 +00:00
win1251.c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
wstrcmp.c Add $PostgreSQL$ markers to a lot of files that were missing them. 2008-05-17 01:28:26 +00:00
wstrncmp.c Add $PostgreSQL$ markers to a lot of files that were missing them. 2008-05-17 01:28:26 +00:00

README

$PostgreSQL: pgsql/src/backend/utils/mb/README,v 1.8 2008/06/17 18:22:43 momjian Exp $

Encodings
=========

encnames.c:	public functions for both the backend and the frontend.
conv.c:		static functions and a public table for code conversion
wchar.c:	mostly static functions and a public table for mb string and
		multibyte conversion
mbutils.c:	public functions for the backend only.
		requires conv.c and wchar.c
wstrcmp.c:	strcmp for mb
wstrncmp.c:	strncmp for mb
win866.c:	a tool to generate KOI8 <--> CP866 conversion table
iso.c:		a tool to generate KOI8 <--> ISO8859-5 conversion table
win1251.c:	a tool to generate KOI8 <--> CP1251 conversion table

Introduction
------------
	http://www.cprogramming.com/tutorial/unicode.html