1//
2// Latin2Encoding.h
3//
4// Library: Foundation
5// Package: Text
6// Module: Latin2Encoding
7//
8// Definition of the Latin2Encoding class.
9//
10// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
11// and Contributors.
12//
13// SPDX-License-Identifier: BSL-1.0
14//
15
16
17#ifndef Foundation_Latin2Encoding_INCLUDED
18#define Foundation_Latin2Encoding_INCLUDED
19
20
21#include "Poco/Foundation.h"
22#include "Poco/TextEncoding.h"
23
24
25namespace Poco {
26
27
28class Foundation_API Latin2Encoding: public TextEncoding
29 /// ISO Latin-2 (8859-2) text encoding.
30 ///
31 /// Latin-2 is basically Latin-1 with the EURO sign plus
32 /// some other minor changes.
33{
34public:
35 Latin2Encoding();
36 virtual ~Latin2Encoding();
37 const char* canonicalName() const;
38 bool isA(const std::string& encodingName) const;
39 const CharacterMap& characterMap() const;
40 int convert(const unsigned char* bytes) const;
41 int convert(int ch, unsigned char* bytes, int length) const;
42 int queryConvert(const unsigned char* bytes, int length) const;
43 int sequenceLength(const unsigned char* bytes, int length) const;
44
45private:
46 static const char* _names[];
47 static const CharacterMap _charMap;
48};
49
50
51} // namespace Poco
52
53
54#endif // Foundation_Latin2Encoding_INCLUDED
55