comparison Core/Enumerations.cpp @ 3217:cf8cbeb35f33

preliminary support of Korean character set
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 13 Feb 2019 17:46:12 +0100
parents 810772486249
children 9a83d94b2a1e
comparison
equal deleted inserted replaced
3216:c9a71eb4edcf 3217:cf8cbeb35f33
644 case Encoding_Japanese: 644 case Encoding_Japanese:
645 return "Japanese"; 645 return "Japanese";
646 646
647 case Encoding_Chinese: 647 case Encoding_Chinese:
648 return "Chinese"; 648 return "Chinese";
649
650 case Encoding_Korean:
651 return "Korean";
649 652
650 default: 653 default:
651 throw OrthancException(ErrorCode_ParameterOutOfRange); 654 throw OrthancException(ErrorCode_ParameterOutOfRange);
652 } 655 }
653 } 656 }
1200 if (s == "CHINESE") 1203 if (s == "CHINESE")
1201 { 1204 {
1202 return Encoding_Chinese; 1205 return Encoding_Chinese;
1203 } 1206 }
1204 1207
1208 if (s == "KOREAN")
1209 {
1210 return Encoding_Korean;
1211 }
1212
1205 throw OrthancException(ErrorCode_ParameterOutOfRange); 1213 throw OrthancException(ErrorCode_ParameterOutOfRange);
1206 } 1214 }
1207 1215
1208 1216
1209 ResourceType StringToResourceType(const char* type) 1217 ResourceType StringToResourceType(const char* type)
1834 else if (s == "ISO_IR 138" || 1842 else if (s == "ISO_IR 138" ||
1835 s == "ISO 2022 IR 138") 1843 s == "ISO 2022 IR 138")
1836 { 1844 {
1837 encoding = Encoding_Hebrew; 1845 encoding = Encoding_Hebrew;
1838 } 1846 }
1839 else if (s == "ISO_IR 166" || s == "ISO 2022 IR 166") 1847 else if (s == "ISO_IR 166" ||
1848 s == "ISO 2022 IR 166")
1840 { 1849 {
1841 encoding = Encoding_Thai; 1850 encoding = Encoding_Thai;
1842 } 1851 }
1843 else if (s == "ISO_IR 13" || s == "ISO 2022 IR 13") 1852 else if (s == "ISO_IR 13" ||
1853 s == "ISO 2022 IR 13")
1844 { 1854 {
1845 encoding = Encoding_Japanese; 1855 encoding = Encoding_Japanese;
1846 } 1856 }
1847 else if (s == "GB18030" || s == "GBK") 1857 else if (s == "GB18030" || s == "GBK")
1848 { 1858 {
1853 * suggest support it." 1863 * suggest support it."
1854 * https://groups.google.com/d/msg/orthanc-users/WMM8LMbjpUc/02-1f_yFCgAJ 1864 * https://groups.google.com/d/msg/orthanc-users/WMM8LMbjpUc/02-1f_yFCgAJ
1855 **/ 1865 **/
1856 encoding = Encoding_Chinese; 1866 encoding = Encoding_Chinese;
1857 } 1867 }
1868 else if (s == "ISO 2022 IR 149")
1869 {
1870 encoding = Encoding_Korean;
1871 }
1858 /* 1872 /*
1859 else if (s == "ISO 2022 IR 149")
1860 {
1861 TODO
1862 }
1863 else if (s == "ISO 2022 IR 159") 1873 else if (s == "ISO 2022 IR 159")
1864 { 1874 {
1865 TODO 1875 TODO
1866 } 1876 }
1867 else if (s == "ISO 2022 IR 87") 1877 else if (s == "ISO 2022 IR 87")
2010 case Encoding_Chinese: 2020 case Encoding_Chinese:
2011 return "GB18030"; 2021 return "GB18030";
2012 2022
2013 case Encoding_Thai: 2023 case Encoding_Thai:
2014 return "ISO_IR 166"; 2024 return "ISO_IR 166";
2025
2026 case Encoding_Korean:
2027 return "ISO 2022 IR 149";
2015 2028
2016 default: 2029 default:
2017 throw OrthancException(ErrorCode_ParameterOutOfRange); 2030 throw OrthancException(ErrorCode_ParameterOutOfRange);
2018 } 2031 }
2019 } 2032 }