| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FGAS_CRT_FGAS_CODEPAGE_H_ | 7 #ifndef XFA_FGAS_CRT_FGAS_CODEPAGE_H_ |
| 8 #define XFA_FGAS_CRT_FGAS_CODEPAGE_H_ | 8 #define XFA_FGAS_CRT_FGAS_CODEPAGE_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_basic.h" | 10 #include "core/include/fxcrt/fx_basic.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 #define FX_CHARSET_ArabicTraditional 179 | 126 #define FX_CHARSET_ArabicTraditional 179 |
| 127 #define FX_CHARSET_ArabicUser 180 | 127 #define FX_CHARSET_ArabicUser 180 |
| 128 #define FX_CHARSET_HebrewUser 181 | 128 #define FX_CHARSET_HebrewUser 181 |
| 129 #define FX_CHARSET_MSWin_Baltic 186 | 129 #define FX_CHARSET_MSWin_Baltic 186 |
| 130 #define FX_CHARSET_MSWin_Cyrillic 204 | 130 #define FX_CHARSET_MSWin_Cyrillic 204 |
| 131 #define FX_CHARSET_Thai 222 | 131 #define FX_CHARSET_Thai 222 |
| 132 #define FX_CHARSET_MSWin_EasterEuropean 238 | 132 #define FX_CHARSET_MSWin_EasterEuropean 238 |
| 133 #define FX_CHARSET_US 254 | 133 #define FX_CHARSET_US 254 |
| 134 #define FX_CHARSET_OEM 255 | 134 #define FX_CHARSET_OEM 255 |
| 135 | 135 |
| 136 FX_WORD FX_GetCodePageFromCharset(uint8_t charset); | 136 uint16_t FX_GetCodePageFromCharset(uint8_t charset); |
| 137 FX_WORD FX_GetCharsetFromCodePage(FX_WORD codepage); | 137 uint16_t FX_GetCharsetFromCodePage(uint16_t codepage); |
| 138 FX_WORD FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength); | 138 uint16_t FX_GetCodePageFromStringA(const FX_CHAR* pStr, int32_t iLength); |
| 139 FX_WORD FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength); | 139 uint16_t FX_GetCodePageFormStringW(const FX_WCHAR* pStr, int32_t iLength); |
| 140 FX_WORD FX_GetDefCodePageByLanguage(FX_WORD wLanguage); | 140 uint16_t FX_GetDefCodePageByLanguage(uint16_t wLanguage); |
| 141 void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength); | 141 void FX_SwapByteOrder(FX_WCHAR* pStr, int32_t iLength); |
| 142 void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, | 142 void FX_SwapByteOrderCopy(const FX_WCHAR* pSrc, |
| 143 FX_WCHAR* pDst, | 143 FX_WCHAR* pDst, |
| 144 int32_t iLength); | 144 int32_t iLength); |
| 145 void FX_UTF16ToWChar(void* pBuffer, int32_t iLength); | 145 void FX_UTF16ToWChar(void* pBuffer, int32_t iLength); |
| 146 void FX_UTF16ToWCharCopy(const FX_WORD* pUTF16, | 146 void FX_UTF16ToWCharCopy(const uint16_t* pUTF16, |
| 147 FX_WCHAR* pWChar, | 147 FX_WCHAR* pWChar, |
| 148 int32_t iLength); | 148 int32_t iLength); |
| 149 void FX_WCharToUTF16(void* pBuffer, int32_t iLength); | 149 void FX_WCharToUTF16(void* pBuffer, int32_t iLength); |
| 150 void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, | 150 void FX_WCharToUTF16Copy(const FX_WCHAR* pWChar, |
| 151 FX_WORD* pUTF16, | 151 uint16_t* pUTF16, |
| 152 int32_t iLength); | 152 int32_t iLength); |
| 153 int32_t FX_DecodeString(FX_WORD wCodePage, | 153 int32_t FX_DecodeString(uint16_t wCodePage, |
| 154 const FX_CHAR* pSrc, | 154 const FX_CHAR* pSrc, |
| 155 int32_t* pSrcLen, | 155 int32_t* pSrcLen, |
| 156 FX_WCHAR* pDst, | 156 FX_WCHAR* pDst, |
| 157 int32_t* pDstLen, | 157 int32_t* pDstLen, |
| 158 FX_BOOL bErrBreak = FALSE); | 158 FX_BOOL bErrBreak = FALSE); |
| 159 int32_t FX_UTF8Decode(const FX_CHAR* pSrc, | 159 int32_t FX_UTF8Decode(const FX_CHAR* pSrc, |
| 160 int32_t* pSrcLen, | 160 int32_t* pSrcLen, |
| 161 FX_WCHAR* pDst, | 161 FX_WCHAR* pDst, |
| 162 int32_t* pDstLen); | 162 int32_t* pDstLen); |
| 163 | 163 |
| 164 struct FX_STR2CPHASH { | 164 struct FX_STR2CPHASH { |
| 165 uint32_t uHash; | 165 uint32_t uHash; |
| 166 uint16_t uCodePage; | 166 uint16_t uCodePage; |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 struct FX_CHARSET_MAP { | 169 struct FX_CHARSET_MAP { |
| 170 uint16_t charset; | 170 uint16_t charset; |
| 171 uint16_t codepage; | 171 uint16_t codepage; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 struct FX_LANG2CPMAP { | 174 struct FX_LANG2CPMAP { |
| 175 uint16_t wLanguage; | 175 uint16_t wLanguage; |
| 176 uint16_t wCodepage; | 176 uint16_t wCodepage; |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 #endif // XFA_FGAS_CRT_FGAS_CODEPAGE_H_ | 179 #endif // XFA_FGAS_CRT_FGAS_CODEPAGE_H_ |
| OLD | NEW |