mirror of
https://github.com/postgres/postgres.git
synced 2025-11-13 16:22:44 +03:00
Remove all traces of multibyte and locale options. Clean up comments
referring to "multibyte" where it really means character encoding.
This commit is contained in:
@@ -2,7 +2,7 @@ common.c: public functions for both the backend and the frontend.
|
||||
requires conv.c and wchar.c
|
||||
conv.c: static functions and a public table for code conversion
|
||||
wchar.c: mostly static functions and a public table for mb string and
|
||||
multi-byte conversion
|
||||
multibyte conversion
|
||||
mbutilc.c: public functions for the backend only.
|
||||
requires conv.c and wchar.c
|
||||
wstrcmp.c: strcmp for mb
|
||||
@@ -12,4 +12,4 @@ iso.c: a tool to generate KOI8 <--> ISO8859-5 conversion table
|
||||
win.c: a tool to generate KOI8 <--> CP1251 conversion table
|
||||
big5.c: conversion between BIG5 and Mule Internal Code(CNS 116643-1992
|
||||
plane 1 and plane 2).
|
||||
utftest.c: test driver for utf2wchar()
|
||||
utftest.c: test driver for utf2wchar()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Encoding names and routines for work with it. All
|
||||
* in this file is shared bedween FE and BE.
|
||||
*
|
||||
* $Id: encnames.c,v 1.8 2002/06/13 08:28:54 ishii Exp $
|
||||
* $Id: encnames.c,v 1.9 2002/09/03 21:45:43 petere Exp $
|
||||
*/
|
||||
#ifdef FRONTEND
|
||||
#include "postgres_fe.h"
|
||||
@@ -44,7 +44,7 @@ pg_encname pg_encname_tbl[] =
|
||||
}, /* IBM866 */
|
||||
{
|
||||
"big5", PG_BIG5
|
||||
}, /* Big5; Chinese for Taiwan Multi-byte set */
|
||||
}, /* Big5; Chinese for Taiwan multibyte set */
|
||||
{
|
||||
"euccn", PG_EUC_CN
|
||||
}, /* EUC-CN; Extended Unix Code for
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* client encoding and server internal encoding.
|
||||
* (currently mule internal code (mic) is used)
|
||||
* Tatsuo Ishii
|
||||
* $Id: mbutils.c,v 1.33 2002/08/29 07:22:28 ishii Exp $
|
||||
* $Id: mbutils.c,v 1.34 2002/09/03 21:45:43 petere Exp $
|
||||
*/
|
||||
#include "postgres.h"
|
||||
#include "access/xact.h"
|
||||
@@ -347,28 +347,28 @@ perform_default_encoding_conversion(unsigned char *src, int len, bool is_client_
|
||||
return result;
|
||||
}
|
||||
|
||||
/* convert a multi-byte string to a wchar */
|
||||
/* convert a multibyte string to a wchar */
|
||||
int
|
||||
pg_mb2wchar(const unsigned char *from, pg_wchar *to)
|
||||
{
|
||||
return (*pg_wchar_table[DatabaseEncoding->encoding].mb2wchar_with_len) (from, to, strlen(from));
|
||||
}
|
||||
|
||||
/* convert a multi-byte string to a wchar with a limited length */
|
||||
/* convert a multibyte string to a wchar with a limited length */
|
||||
int
|
||||
pg_mb2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
|
||||
{
|
||||
return (*pg_wchar_table[DatabaseEncoding->encoding].mb2wchar_with_len) (from, to, len);
|
||||
}
|
||||
|
||||
/* returns the byte length of a multi-byte word */
|
||||
/* returns the byte length of a multibyte word */
|
||||
int
|
||||
pg_mblen(const unsigned char *mbstr)
|
||||
{
|
||||
return ((*pg_wchar_table[DatabaseEncoding->encoding].mblen) (mbstr));
|
||||
}
|
||||
|
||||
/* returns the length (counted as a wchar) of a multi-byte string */
|
||||
/* returns the length (counted as a wchar) of a multibyte string */
|
||||
int
|
||||
pg_mbstrlen(const unsigned char *mbstr)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ pg_mbstrlen(const unsigned char *mbstr)
|
||||
return (len);
|
||||
}
|
||||
|
||||
/* returns the length (counted as a wchar) of a multi-byte string
|
||||
/* returns the length (counted as a wchar) of a multibyte string
|
||||
(not necessarily NULL terminated) */
|
||||
int
|
||||
pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
|
||||
@@ -405,10 +405,10 @@ pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
|
||||
}
|
||||
|
||||
/*
|
||||
* returns the byte length of a multi-byte string
|
||||
* returns the byte length of a multibyte string
|
||||
* (not necessarily NULL terminated)
|
||||
* that is no longer than limit.
|
||||
* this function does not break multi-byte word boundary.
|
||||
* this function does not break multibyte word boundary.
|
||||
*/
|
||||
int
|
||||
pg_mbcliplen(const unsigned char *mbstr, int len, int limit)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* conversion functions between pg_wchar and multi-byte streams.
|
||||
* conversion functions between pg_wchar and multibyte streams.
|
||||
* Tatsuo Ishii
|
||||
* $Id: wchar.c,v 1.28 2002/06/13 08:28:54 ishii Exp $
|
||||
* $Id: wchar.c,v 1.29 2002/09/03 21:45:43 petere Exp $
|
||||
*
|
||||
* WIN1250 client encoding updated by Pavel Behal
|
||||
*
|
||||
@@ -580,7 +580,7 @@ pg_mic_mblen(const unsigned char *mbstr)
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the byte length of a multi-byte word.
|
||||
* Returns the byte length of a multibyte word.
|
||||
*/
|
||||
int
|
||||
pg_encoding_mblen(int encoding, const unsigned char *mbstr)
|
||||
@@ -638,7 +638,7 @@ pg_verifymbstr(const unsigned char *mbstr, int len)
|
||||
|
||||
l = pg_mblen(mbstr);
|
||||
|
||||
/* multi-byte letter? */
|
||||
/* multibyte letter? */
|
||||
if (l > 1)
|
||||
{
|
||||
for (i = 1; i < l; i++)
|
||||
@@ -646,7 +646,7 @@ pg_verifymbstr(const unsigned char *mbstr, int len)
|
||||
if (i > len || *(mbstr + i) == '\0' ||
|
||||
|
||||
/*
|
||||
* we assume that every muti-byte letter consists of bytes
|
||||
* we assume that every multibyte letter consists of bytes
|
||||
* being the 8th bit set
|
||||
*/
|
||||
((*(mbstr + i) & 0x80) == 0))
|
||||
|
||||
Reference in New Issue
Block a user