mirror of https://github.com/apache/poi.git
- Added a couple of Macintosh codepage numbers to Java encoding names.
Thanks to Ralf Terdic <ralf.t@gmx.net> for providing them! However, please note that neither Ralf nor I were able to test all those mappings. So please post a bug if you encounter any problems! git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6ff805edf3
commit
7860872993
|
@ -11,15 +11,65 @@ package org.apache.poi.hpsf;
|
|||
public class Constants
|
||||
{
|
||||
|
||||
/** <p>Codepage for Macintosh Roman (MacRoman)</p> */
|
||||
public static final int CP_MACROMAN = 10000;
|
||||
|
||||
/** <p>Codepage for SJIS</p> */
|
||||
public static final int CP_SJIS = 932;
|
||||
|
||||
/** <p>Codepage for UTF-16</p> */
|
||||
public static final int CP_UTF16 = 1200;
|
||||
|
||||
/** <p>Codepage for Macintosh Roman (Java: MacRoman)</p> */
|
||||
public static final int CP_MAC_ROMAN = 10000;
|
||||
|
||||
/** <p>Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or
|
||||
* cp943)</p> */
|
||||
public static final int CP_MAC_JAPAN = 10001;
|
||||
|
||||
/** <p>Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5,
|
||||
* MS950, or cp937)</p> */
|
||||
public static final int CP_MAC_CHINESE_TRADITIONAL = 10002;
|
||||
|
||||
/** <p>Codepage for Macintosh Korean (Java: unknown - use EUC_KR or
|
||||
* cp949)</p> */
|
||||
public static final int CP_MAC_KOREAN = 10003;
|
||||
|
||||
/** <p>Codepage for Macintosh Arabic (Java: MacArabic)</p> */
|
||||
public static final int CP_MAC_ARABIC = 10004;
|
||||
|
||||
/** <p>Codepage for Macintosh Hebrew (Java: MacHebrew)</p> */
|
||||
public static final int CP_MAC_HEBREW = 10005;
|
||||
|
||||
/** <p>Codepage for Macintosh Greek (Java: MacGreek)</p> */
|
||||
public static final int CP_MAC_GREEK = 10006;
|
||||
|
||||
/** <p>Codepage for Macintosh Cyrillic (Java: MacCyrillic)</p> */
|
||||
public static final int CP_MAC_CYRILLIC = 10007;
|
||||
|
||||
/** <p>Codepage for Macintosh Chinese Simplified (Java: unknown - use
|
||||
* EUC_CN, ISO2022_CN_GB, MS936 or cp935)</p> */
|
||||
public static final int CP_MAC_CHINESE_SIMPLE = 10008;
|
||||
|
||||
/** <p>Codepage for Macintosh Romanian (Java: MacRomania)</p> */
|
||||
public static final int CP_MAC_ROMANIA = 10010;
|
||||
|
||||
/** <p>Codepage for Macintosh Ukrainian (Java: MacUkraine)</p> */
|
||||
public static final int CP_MAC_UKRAINE = 10017;
|
||||
|
||||
/** <p>Codepage for Macintosh Thai (Java: MacThai)</p> */
|
||||
public static final int CP_MAC_THAI = 10021;
|
||||
|
||||
/** <p>Codepage for Macintosh Central Europe (Latin-2)
|
||||
* (Java: MacCentralEurope)</p> */
|
||||
public static final int CP_MAC_CENTRAL_EUROPE = 10029;
|
||||
|
||||
/** <p>Codepage for Macintosh Iceland (Java: MacIceland)</p> */
|
||||
public static final int CP_MAC_ICELAND = 10079;
|
||||
|
||||
/** <p>Codepage for Macintosh Turkish (Java: MacTurkish)</p> */
|
||||
public static final int CP_MAC_TURKISH = 10081;
|
||||
|
||||
/** <p>Codepage for Macintosh Croatian (Java: MacCroatian)</p> */
|
||||
public static final int CP_MAC_CROATIAN = 10082;
|
||||
|
||||
/** <p>Codepage for UTF-8</p> */
|
||||
public static final int CP_UTF8 = 65001;
|
||||
|
||||
|
|
|
@ -294,8 +294,38 @@ public class VariantSupport extends Variant
|
|||
("Codepage number may not be " + codepage);
|
||||
switch (codepage)
|
||||
{
|
||||
case Constants.CP_MACROMAN:
|
||||
case Constants.CP_MAC_ROMAN:
|
||||
return "MacRoman";
|
||||
case Constants.CP_MAC_JAPAN:
|
||||
return "SJIS";
|
||||
case Constants.CP_MAC_CHINESE_TRADITIONAL:
|
||||
return "Big5";
|
||||
case Constants.CP_MAC_KOREAN:
|
||||
return "EUC-KR";
|
||||
case Constants.CP_MAC_ARABIC:
|
||||
return "MacArabic";
|
||||
case Constants.CP_MAC_HEBREW:
|
||||
return "MacHebrew";
|
||||
case Constants.CP_MAC_GREEK:
|
||||
return "MacGreek";
|
||||
case Constants.CP_MAC_CYRILLIC:
|
||||
return "MacCyrillic";
|
||||
case Constants.CP_MAC_CHINESE_SIMPLE:
|
||||
return "EUC_CN";
|
||||
case Constants.CP_MAC_ROMANIA:
|
||||
return "MacRomania";
|
||||
case Constants.CP_MAC_UKRAINE:
|
||||
return "MacUkraine";
|
||||
case Constants.CP_MAC_THAI:
|
||||
return "MacThai";
|
||||
case Constants.CP_MAC_CENTRAL_EUROPE:
|
||||
return "MacCentralEurope";
|
||||
case Constants.CP_MAC_ICELAND:
|
||||
return "MacIceland";
|
||||
case Constants.CP_MAC_TURKISH:
|
||||
return "MacTurkish";
|
||||
case Constants.CP_MAC_CROATIAN:
|
||||
return "MacCroatian";
|
||||
case Constants.CP_SJIS:
|
||||
return "SJIS";
|
||||
case Constants.CP_UTF16:
|
||||
|
|
Loading…
Reference in New Issue