1 | // |
2 | // Latin9Encoding.h |
3 | // |
4 | // Library: Foundation |
5 | // Package: Text |
6 | // Module: Latin9Encoding |
7 | // |
8 | // Definition of the Latin9Encoding 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_Latin9Encoding_INCLUDED |
18 | #define Foundation_Latin9Encoding_INCLUDED |
19 | |
20 | |
21 | #include "Poco/Foundation.h" |
22 | #include "Poco/TextEncoding.h" |
23 | |
24 | |
25 | namespace Poco { |
26 | |
27 | |
28 | class Foundation_API Latin9Encoding: public TextEncoding |
29 | /// ISO Latin-9 (8859-15) text encoding. |
30 | /// |
31 | /// Latin-9 is basically Latin-1 with the EURO sign plus |
32 | /// some other minor changes. |
33 | { |
34 | public: |
35 | Latin9Encoding(); |
36 | ~Latin9Encoding(); |
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 | |
45 | private: |
46 | static const char* _names[]; |
47 | static const CharacterMap _charMap; |
48 | }; |
49 | |
50 | |
51 | } // namespace Poco |
52 | |
53 | |
54 | #endif // Foundation_Latin9Encoding_INCLUDED |
55 | |