| 1 | /* |
| 2 | * ISO 8859-15 codepage (Latin 9) function |
| 3 | * |
| 4 | * Copyright (C) 2008-2024, Joachim Metz <[email protected]> |
| 5 | * |
| 6 | * Refer to AUTHORS for acknowledgements. |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU Lesser General Public License as published by |
| 10 | * the Free Software Foundation, either version 3 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU Lesser General Public License |
| 19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 20 | */ |
| 21 | |
| 22 | #include <common.h> |
| 23 | #include <types.h> |
| 24 | |
| 25 | #include "libuna_codepage_iso_8859_15.h" |
| 26 | |
| 27 | /* Extended ASCII to Unicode character lookup table for ISO 8859-15 codepage |
| 28 | * Unknown are filled with the Unicode replacement character 0xfffd |
| 29 | */ |
| 30 | const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ] = { |
| 31 | 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, |
| 32 | 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, |
| 33 | 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, |
| 34 | 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf |
| 35 | }; |
| 36 | |
| 37 | /* Unicode to ASCII character lookup table for ISO 8859-15 codepage |
| 38 | * Unknown are filled with the ASCII replacement character 0x1a |
| 39 | */ |
| 40 | const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ] = { |
| 41 | 0xa0, 0xa1, 0xa2, 0xa3, 0x1a, 0xa5, 0x1a, 0xa7, |
| 42 | 0x1a, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, |
| 43 | 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, |
| 44 | 0x1a, 0xb9, 0xba, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf |
| 45 | }; |
| 46 |