diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-12-28 12:13:40 +0100 |
| commit | b0afb8fe0ff1d87165af9df61501197a06240dda (patch) | |
| tree | 274ac6a96c53ef4c19ab4974ce24a06a233128c5 /gl/uniwidth/cjk.h | |
| parent | 68fc05381ee5fa0aee1413118fbb3d81ca888b09 (diff) | |
| download | monitoring-plugins-b0afb8fe0ff1d87165af9df61501197a06240dda.tar.gz | |
Sync with Gnulib stable-202507 code (a8ac9f9ce5)
Diffstat (limited to 'gl/uniwidth/cjk.h')
| -rw-r--r-- | gl/uniwidth/cjk.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gl/uniwidth/cjk.h b/gl/uniwidth/cjk.h new file mode 100644 index 00000000..af41f637 --- /dev/null +++ b/gl/uniwidth/cjk.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* Test for CJK encoding. | ||
| 2 | Copyright (C) 2001-2002, 2005-2007, 2009-2025 Free Software Foundation, Inc. | ||
| 3 | Written by Bruno Haible <bruno@clisp.org>, 2002. | ||
| 4 | |||
| 5 | This file is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU Lesser General Public License as | ||
| 7 | published by the Free Software Foundation; either version 2.1 of the | ||
| 8 | License, or (at your option) any later version. | ||
| 9 | |||
| 10 | This file is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU Lesser General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | ||
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | #include "streq.h" | ||
| 19 | |||
| 20 | static int | ||
| 21 | is_cjk_encoding (const char *encoding) | ||
| 22 | { | ||
| 23 | if (0 | ||
| 24 | /* Legacy Japanese encodings */ | ||
| 25 | || STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0) | ||
| 26 | /* Legacy Chinese encodings */ | ||
| 27 | || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) | ||
| 28 | || STREQ_OPT (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0) | ||
| 29 | || STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0) | ||
| 30 | || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0) | ||
| 31 | /* Legacy Korean encodings */ | ||
| 32 | || STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) | ||
| 33 | || STREQ_OPT (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0) | ||
| 34 | || STREQ_OPT (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0)) | ||
| 35 | return 1; | ||
| 36 | return 0; | ||
| 37 | } | ||
