Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ed06824

Browse files
committed
Add support for Latin9 encoding in to_ascii(). Jaime Casanova
1 parent b5ae0d6 commit ed06824

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/backend/utils/adt/ascii.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Portions Copyright (c) 1999-2004, PostgreSQL Global Development Group
66
*
77
* IDENTIFICATION
8-
* $PostgreSQL: pgsql/src/backend/utils/adt/ascii.c,v 1.22 2004/08/29 05:06:49 momjian Exp $
8+
* $PostgreSQL: pgsql/src/backend/utils/adt/ascii.c,v 1.23 2004/12/20 19:00:37 tgl Exp $
99
*
1010
*-----------------------------------------------------------------------
1111
*/
@@ -28,7 +28,7 @@ static void
2828
pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int enc)
2929
{
3030
unsigned char *x;
31-
unsigned char *ascii;
31+
const unsigned char *ascii;
3232
int range;
3333

3434
/*
@@ -53,6 +53,14 @@ pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int
5353
ascii = " A L LS \"SSTZ-ZZ a,l'ls ,sstz\"zzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTBraaaalccceeeeiiddnnoooo/ruuuuyt.";
5454
range = RANGE_160;
5555
}
56+
else if (enc == PG_LATIN9)
57+
{
58+
/*
59+
* ISO-8859-15 <range: 160 -- 255>
60+
*/
61+
ascii = " cL YS sCa -R Zu .z EeY?AAAAAAACEEEEIIII NOOOOOxOUUUUYTBaaaaaaaceeeeiiii nooooo/ouuuuyty";
62+
range = RANGE_160;
63+
}
5664
else if (enc == PG_WIN1250)
5765
{
5866
/*

0 commit comments

Comments
 (0)