2 # $PostgreSQL: pgsql/src/backend/utils/mb/Unicode/ucs2utf.pl,v 1.2 2003/11/29 22:40:01 pgsql Exp $
3 # convert UCS-2 to UTF-8
11 } elsif ($ucs > 0x007f && $ucs <= 0x07ff) {
12 $utf = (($ucs & 0x003f) | 0x80) | ((($ucs >> 6) | 0xc0) << 8);
14 $utf = ((($ucs >> 12) | 0xe0) << 16) |
15 (((($ucs & 0x0fc0) >> 6) | 0x80) << 8) |
16 (($ucs & 0x003f) | 0x80);