/*
* Windows 949 codepage (Korean) functions
*
* Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
#include <common.h>
#include <types.h>
#include "libuna_codepage_windows_949.h"
#include "libuna_libcerror.h"
#include "libuna_types.h"
/* Extended ASCII to Unicode character lookup table for Windows 949 codepage
* Unknown are filled with the Unicode replacement character 0xfffd
*/
const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ 192 ] = {
0xfffd, 0xac02, 0xac03, 0xac05, 0xac06, 0xac0b, 0xac0c, 0xac0d,
0xac0e, 0xac0f, 0xac18, 0xac1e, 0xac1f, 0xac21, 0xac22, 0xac23,
0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2e,
0xac32, 0xac33, 0xac34, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xac35, 0xac36, 0xac37, 0xac3a, 0xac3b, 0xac3d, 0xac3e,
0xac3f, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47,
0xac48, 0xac49, 0xac4a, 0xac4c, 0xac4e, 0xac4f, 0xac50, 0xac51,
0xac52, 0xac53, 0xac55, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xac56, 0xac57, 0xac59, 0xac5a, 0xac5b, 0xac5d, 0xac5e,
0xac5f, 0xac60, 0xac61, 0xac62, 0xac63, 0xac64, 0xac65, 0xac66,
0xac67, 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e,
0xac6f, 0xac72, 0xac73, 0xac75, 0xac76, 0xac79, 0xac7b, 0xac7c,
0xac7d, 0xac7e, 0xac7f, 0xac82, 0xac87, 0xac88, 0xac8d, 0xac8e,
0xac8f, 0xac91, 0xac92, 0xac93, 0xac95, 0xac96, 0xac97, 0xac98,
0xac99, 0xac9a, 0xac9b, 0xac9e, 0xaca2, 0xaca3, 0xaca4, 0xaca5,
0xaca6, 0xaca7, 0xacab, 0xacad, 0xacae, 0xacb1, 0xacb2, 0xacb3,
0xacb4, 0xacb5, 0xacb6, 0xacb7, 0xacba, 0xacbe, 0xacbf, 0xacc0,
0xacc2, 0xacc3, 0xacc5, 0xacc6, 0xacc7, 0xacc9, 0xacca, 0xaccb,
0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4,
0xacd6, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde,
0xacdf, 0xace2, 0xace3, 0xace5, 0xace6, 0xace9, 0xaceb, 0xaced,
0xacee, 0xacf2, 0xacf4, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb,
0xacfe, 0xacff, 0xad01, 0xad02, 0xad03, 0xad05, 0xad07, 0xad08,
0xad09, 0xad0a, 0xad0b, 0xad0e, 0xad10, 0xad12, 0xad13, 0xfffd
};
const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ 192 ] = {
0xfffd, 0xad14, 0xad15, 0xad16, 0xad17, 0xad19, 0xad1a, 0xad1b,
0xad1d, 0xad1e, 0xad1f, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25,
0xad26, 0xad27, 0xad28, 0xad2a, 0xad2b, 0xad2e, 0xad2f, 0xad30,
0xad31, 0xad32, 0xad33, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xad36, 0xad37, 0xad39, 0xad3a, 0xad3b, 0xad3d, 0xad3e,
0xad3f, 0xad40, 0xad41, 0xad42, 0xad43, 0xad46, 0xad48, 0xad4a,
0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0xad51, 0xad52, 0xad53,
0xad55, 0xad56, 0xad57, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f,
0xad60, 0xad62, 0xad64, 0xad65, 0xad66, 0xad67, 0xad68, 0xad69,
0xad6a, 0xad6b, 0xad6e, 0xad6f, 0xad71, 0xad72, 0xad77, 0xad78,
0xad79, 0xad7a, 0xad7e, 0xad80, 0xad83, 0xad84, 0xad85, 0xad86,
0xad87, 0xad8a, 0xad8b, 0xad8d, 0xad8e, 0xad8f, 0xad91, 0xad92,
0xad93, 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, 0xad9a,
0xad9b, 0xad9e, 0xad9f, 0xada0, 0xada1, 0xada2, 0xada3, 0xada5,
0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad,
0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5,
0xadb6, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe,
0xadbf, 0xadc2, 0xadc3, 0xadc5, 0xadc6, 0xadc7, 0xadc9, 0xadca,
0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, 0xadd2, 0xadd4, 0xadd5,
0xadd6, 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddd, 0xadde,
0xaddf, 0xade1, 0xade2, 0xade3, 0xade5, 0xade6, 0xade7, 0xade8,
0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, 0xadef, 0xadf0,
0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, 0xfffd
};
const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ 192 ] = {
0xfffd, 0xadfa, 0xadfb, 0xadfd, 0xadfe, 0xae02, 0xae03, 0xae04,
0xae05, 0xae06, 0xae07, 0xae0a, 0xae0c, 0xae0e, 0xae0f, 0xae10,
0xae11, 0xae12, 0xae13, 0xae15, 0xae16, 0xae17, 0xae18, 0xae19,
0xae1a, 0xae1b, 0xae1c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xae1d, 0xae1e, 0xae1f, 0xae20, 0xae21, 0xae22, 0xae23,
0xae24, 0xae25, 0xae26, 0xae27, 0xae28, 0xae29, 0xae2a, 0xae2b,
0xae2c, 0xae2d, 0xae2e, 0xae2f, 0xae32, 0xae33, 0xae35, 0xae36,
0xae39, 0xae3b, 0xae3c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xae3d, 0xae3e, 0xae3f, 0xae42, 0xae44, 0xae47, 0xae48,
0xae49, 0xae4b, 0xae4f, 0xae51, 0xae52, 0xae53, 0xae55, 0xae57,
0xae58, 0xae59, 0xae5a, 0xae5b, 0xae5e, 0xae62, 0xae63, 0xae64,
0xae66, 0xae67, 0xae6a, 0xae6b, 0xae6d, 0xae6e, 0xae6f, 0xae71,
0xae72, 0xae73, 0xae74, 0xae75, 0xae76, 0xae77, 0xae7a, 0xae7e,
0xae7f, 0xae80, 0xae81, 0xae82, 0xae83, 0xae86, 0xae87, 0xae88,
0xae89, 0xae8a, 0xae8b, 0xae8d, 0xae8e, 0xae8f, 0xae90, 0xae91,
0xae92, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99,
0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, 0xaea0, 0xaea1,
0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8, 0xaea9,
0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0, 0xaeb1,
0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9,
0xaeba, 0xaebb, 0xaebf, 0xaec1, 0xaec2, 0xaec3, 0xaec5, 0xaec6,
0xaec7, 0xaec8, 0xaec9, 0xaeca, 0xaecb, 0xaece, 0xaed2, 0xaed3,
0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaeda, 0xaedb, 0xaedd, 0xaede,
0xaedf, 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xfffd
};
const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ 192 ] = {
0xfffd, 0xaee6, 0xaee7, 0xaee9, 0xaeea, 0xaeec, 0xaeee, 0xaeef,
0xaef0, 0xaef1, 0xaef2, 0xaef3, 0xaef5, 0xaef6, 0xaef7, 0xaef9,
0xaefa, 0xaefb, 0xaefd, 0xaefe, 0xaeff, 0xaf00, 0xaf01, 0xaf02,
0xaf03, 0xaf04, 0xaf05, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xaf06, 0xaf09, 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0e, 0xaf0f,
0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, 0xaf17, 0xaf18,
0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, 0xaf1f, 0xaf20,
0xaf21, 0xaf22, 0xaf23, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xaf24, 0xaf25, 0xaf26, 0xaf27, 0xaf28, 0xaf29, 0xaf2a,
0xaf2b, 0xaf2e, 0xaf2f, 0xaf31, 0xaf33, 0xaf35, 0xaf36, 0xaf37,
0xaf38, 0xaf39, 0xaf3a, 0xaf3b, 0xaf3e, 0xaf40, 0xaf44, 0xaf45,
0xaf46, 0xaf47, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f,
0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58,
0xaf59, 0xaf5a, 0xaf5b, 0xaf5e, 0xaf5f, 0xaf60, 0xaf61, 0xaf62,
0xaf63, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c,
0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf72, 0xaf73, 0xaf74,
0xaf75, 0xaf76, 0xaf77, 0xaf78, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d,
0xaf7e, 0xaf7f, 0xaf81, 0xaf82, 0xaf83, 0xaf85, 0xaf86, 0xaf87,
0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, 0xaf92,
0xaf93, 0xaf94, 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, 0xaf9b,
0xaf9d, 0xaf9e, 0xaf9f, 0xafa0, 0xafa1, 0xafa2, 0xafa3, 0xafa4,
0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac,
0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2, 0xafb3, 0xafb4,
0xafb5, 0xafb6, 0xafb7, 0xafba, 0xafbb, 0xafbd, 0xafbe, 0xfffd
};
const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ 192 ] = {
0xfffd, 0xafbf, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6,
0xafca, 0xafcc, 0xafcf, 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0xafd5,
0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, 0xafdb, 0xafdd,