1/*
2 * Copyright (C) 2008, 2019, 2021, Albert Astals Cid <aacid@kde.org>
3 * Copyright (C) 2017, Adrian Johnson <ajohnson@redneon.com>
4 * Copyright (C) 2018, Adam Reichold <adam.reichold@t-online.de>
5 * Copyright (C) 2019, Oliver Sander <oliver.sander@tu-dresden.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
20 */
21
22#include <algorithm>
23
24#include "printencodings.h"
25
26#include "GlobalParams.h"
27#include "goo/GooString.h"
28
29void printEncodings()
30{
31 std::vector<std::string> encNames = globalParams->getEncodingNames();
32
33 std::sort(first: encNames.begin(), last: encNames.end());
34
35 printf(format: "Available encodings are:\n");
36 for (const std::string &enc : encNames) {
37 printf(format: "%s\n", enc.c_str());
38 }
39}
40

source code of poppler/utils/printencodings.cc