Blame lib/uniwidth/cjk.h

Packit Service fdd496
/* Test for CJK encoding.
Packit Service fdd496
   Copyright (C) 2001-2002, 2005-2007, 2009-2017 Free Software Foundation, Inc.
Packit Service fdd496
   Written by Bruno Haible <bruno@clisp.org>, 2002.
Packit Service fdd496
Packit Service fdd496
   This program is free software: you can redistribute it and/or modify it
Packit Service fdd496
   under the terms of the GNU General Public License as published
Packit Service fdd496
   by the Free Software Foundation; either version 3 of the License, or
Packit Service fdd496
   (at your option) any later version.
Packit Service fdd496
Packit Service fdd496
   This program is distributed in the hope that it will be useful,
Packit Service fdd496
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fdd496
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service fdd496
   General Public License for more details.
Packit Service fdd496
Packit Service fdd496
   You should have received a copy of the GNU General Public License
Packit Service fdd496
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit Service fdd496
Packit Service fdd496
#include "streq.h"
Packit Service fdd496
Packit Service fdd496
static int
Packit Service fdd496
is_cjk_encoding (const char *encoding)
Packit Service fdd496
{
Packit Service fdd496
  if (0
Packit Service fdd496
      /* Legacy Japanese encodings */
Packit Service fdd496
      || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)
Packit Service fdd496
      /* Legacy Chinese encodings */
Packit Service fdd496
      || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
Packit Service fdd496
      || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
Packit Service fdd496
      || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
Packit Service fdd496
      || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
Packit Service fdd496
      /* Legacy Korean encodings */
Packit Service fdd496
      || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
Packit Service fdd496
      || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0)
Packit Service fdd496
      || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0))
Packit Service fdd496
    return 1;
Packit Service fdd496
  return 0;
Packit Service fdd496
}