Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_codepage.h File Reference

(3dce9b5818576f04ce21cec4b3686eda012e5b65)

#include <stdint.h>
#include "core/fxcrt/fx_codepage_forward.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr_exclusion.h"
#include "third_party/base/containers/span.h"
+ Include dependency graph for fx_codepage.h:

Go to the source code of this file.

Classes

struct  FX_CharsetUnicodes
 

Enumerations

enum class  FX_CodePage : uint16_t {
  kDefANSI = 0 , kSymbol = 42 , kMSDOS_US = 437 , kArabic_ASMO708 = 708 ,
  kMSDOS_Greek1 = 737 , kMSDOS_Baltic = 775 , kMSDOS_WesternEuropean = 850 , kMSDOS_EasternEuropean = 852 ,
  kMSDOS_Cyrillic = 855 , kMSDOS_Turkish = 857 , kMSDOS_Portuguese = 860 , kMSDOS_Icelandic = 861 ,
  kMSDOS_Hebrew = 862 , kMSDOS_FrenchCanadian = 863 , kMSDOS_Arabic = 864 , kMSDOS_Norwegian = 865 ,
  kMSDOS_Russian = 866 , kMSDOS_Greek2 = 869 , kMSDOS_Thai = 874 , kShiftJIS = 932 ,
  kChineseSimplified = 936 , kHangul = 949 , kChineseTraditional = 950 , kUTF16LE = 1200 ,
  kUTF16BE = 1201 , kMSWin_EasternEuropean = 1250 , kMSWin_Cyrillic = 1251 , kMSWin_WesternEuropean = 1252 ,
  kMSWin_Greek = 1253 , kMSWin_Turkish = 1254 , kMSWin_Hebrew = 1255 , kMSWin_Arabic = 1256 ,
  kMSWin_Baltic = 1257 , kMSWin_Vietnamese = 1258 , kJohab = 1361 , kMAC_Roman = 10000 ,
  kMAC_ShiftJIS = 10001 , kMAC_ChineseTraditional = 10002 , kMAC_Korean = 10003 , kMAC_Arabic = 10004 ,
  kMAC_Hebrew = 10005 , kMAC_Greek = 10006 , kMAC_Cyrillic = 10007 , kMAC_ChineseSimplified = 10008 ,
  kMAC_Thai = 10021 , kMAC_EasternEuropean = 10029 , kMAC_Turkish = 10081 , kUTF8 = 65001 ,
  kFailure = 65535
}
 
enum class  FX_Charset : uint8_t {
  kANSI = 0 , kDefault = 1 , kSymbol = 2 , kMAC_Roman = 77 ,
  kMAC_ShiftJIS = 78 , kMAC_Korean = 79 , kMAC_ChineseSimplified = 80 , kMAC_ChineseTraditional = 81 ,
  kMAC_Hebrew = 83 , kMAC_Arabic = 84 , kMAC_Greek = 85 , kMAC_Turkish = 86 ,
  kMAC_Thai = 87 , kMAC_EasternEuropean = 88 , kMAC_Cyrillic = 89 , kShiftJIS = 128 ,
  kHangul = 129 , kJohab = 130 , kChineseSimplified = 134 , kChineseTraditional = 136 ,
  kMSWin_Greek = 161 , kMSWin_Turkish = 162 , kMSWin_Vietnamese = 163 , kMSWin_Hebrew = 177 ,
  kMSWin_Arabic = 178 , kMSWin_Baltic = 186 , kMSWin_Cyrillic = 204 , kThai = 222 ,
  kMSWin_EasternEuropean = 238 , kUS = 254 , kOEM = 255
}
 

Functions

FX_CodePage FX_GetACP ()
 
FX_CodePage FX_GetCodePageFromCharset (FX_Charset charset)
 
FX_Charset FX_GetCharsetFromCodePage (FX_CodePage codepage)
 
FX_Charset FX_GetCharsetFromInt (int value)
 
bool FX_CharSetIsCJK (FX_Charset uCharset)
 
size_t FX_WideCharToMultiByte (FX_CodePage codepage, WideStringView wstr, pdfium::span< char > buf)
 
size_t FX_MultiByteToWideChar (FX_CodePage codepage, ByteStringView bstr, pdfium::span< wchar_t > buf)
 

Variables

const FX_CharsetUnicodes kFX_CharsetUnicodes [8]
 

Enumeration Type Documentation

◆ FX_Charset

enum class FX_Charset : uint8_t
strong
Enumerator
kANSI 
kDefault 
kSymbol 
kMAC_Roman 
kMAC_ShiftJIS 
kMAC_Korean 
kMAC_ChineseSimplified 
kMAC_ChineseTraditional 
kMAC_Hebrew 
kMAC_Arabic 
kMAC_Greek 
kMAC_Turkish 
kMAC_Thai 
kMAC_EasternEuropean 
kMAC_Cyrillic 
kShiftJIS 
kHangul 
kJohab 
kChineseSimplified 
kChineseTraditional 
kMSWin_Greek 
kMSWin_Turkish 
kMSWin_Vietnamese 
kMSWin_Hebrew 
kMSWin_Arabic 
kMSWin_Baltic 
kMSWin_Cyrillic 
kThai 
kMSWin_EasternEuropean 
kUS 
kOEM 

Definition at line 70 of file fx_codepage.h.

◆ FX_CodePage

enum class FX_CodePage : uint16_t
strong
Enumerator
kDefANSI 
kSymbol 
kMSDOS_US 
kArabic_ASMO708 
kMSDOS_Greek1 
kMSDOS_Baltic 
kMSDOS_WesternEuropean 
kMSDOS_EasternEuropean 
kMSDOS_Cyrillic 
kMSDOS_Turkish 
kMSDOS_Portuguese 
kMSDOS_Icelandic 
kMSDOS_Hebrew 
kMSDOS_FrenchCanadian 
kMSDOS_Arabic 
kMSDOS_Norwegian 
kMSDOS_Russian 
kMSDOS_Greek2 
kMSDOS_Thai 
kShiftJIS 
kChineseSimplified 
kHangul 
kChineseTraditional 
kUTF16LE 
kUTF16BE 
kMSWin_EasternEuropean 
kMSWin_Cyrillic 
kMSWin_WesternEuropean 
kMSWin_Greek 
kMSWin_Turkish 
kMSWin_Hebrew 
kMSWin_Arabic 
kMSWin_Baltic 
kMSWin_Vietnamese 
kJohab 
kMAC_Roman 
kMAC_ShiftJIS 
kMAC_ChineseTraditional 
kMAC_Korean 
kMAC_Arabic 
kMAC_Hebrew 
kMAC_Greek 
kMAC_Cyrillic 
kMAC_ChineseSimplified 
kMAC_Thai 
kMAC_EasternEuropean 
kMAC_Turkish 
kUTF8 
kFailure 

Definition at line 18 of file fx_codepage.h.

Function Documentation

◆ FX_CharSetIsCJK()

bool FX_CharSetIsCJK ( FX_Charset uCharset)

Definition at line 286 of file fx_codepage.cpp.

References kChineseSimplified, kChineseTraditional, kHangul, and kShiftJIS.

Referenced by CPDF_DocPageData::AddFont(), and CFX_FontMapper::FindSubstFont().

+ Here is the caller graph for this function:

◆ FX_GetACP()

FX_CodePage FX_GetACP ( )

Definition at line 218 of file fx_codepage.cpp.

References kDefANSI.

Referenced by CPDF_BAFontMap::GetNativeCharset().

+ Here is the caller graph for this function:

◆ FX_GetCharsetFromCodePage()

FX_Charset FX_GetCharsetFromCodePage ( FX_CodePage codepage)

Definition at line 239 of file fx_codepage.cpp.

References kANSI.

Referenced by CPDF_BAFontMap::GetNativeCharset().

+ Here is the caller graph for this function:

◆ FX_GetCharsetFromInt()

FX_Charset FX_GetCharsetFromInt ( int value)

◆ FX_GetCodePageFromCharset()

FX_CodePage FX_GetCodePageFromCharset ( FX_Charset charset)

Definition at line 226 of file fx_codepage.cpp.

References kFailure.

◆ FX_MultiByteToWideChar()

size_t FX_MultiByteToWideChar ( FX_CodePage codepage,
ByteStringView bstr,
pdfium::span< wchar_t > buf )

Definition at line 315 of file fx_codepage.cpp.

◆ FX_WideCharToMultiByte()

size_t FX_WideCharToMultiByte ( FX_CodePage codepage,
WideStringView wstr,
pdfium::span< char > buf )

Definition at line 293 of file fx_codepage.cpp.

Variable Documentation

◆ kFX_CharsetUnicodes

const FX_CharsetUnicodes kFX_CharsetUnicodes
extern
Initial value:
= {
{FX_Charset::kThai, kFX_MSDOSThaiUnicodes},
{FX_Charset::kMSWin_EasternEuropean, kFX_MSWinEasternEuropeanUnicodes},
{FX_Charset::kMSWin_Cyrillic, kFX_MSWinCyrillicUnicodes},
{FX_Charset::kMSWin_Greek, kFX_MSWinGreekUnicodes},
{FX_Charset::kMSWin_Turkish, kFX_MSWinTurkishUnicodes},
{FX_Charset::kMSWin_Hebrew, kFX_MSWinHebrewUnicodes},
{FX_Charset::kMSWin_Arabic, kFX_MSWinArabicUnicodes},
{FX_Charset::kMSWin_Baltic, kFX_MSWinBalticUnicodes},
}
@ kMSWin_EasternEuropean

Definition at line 207 of file fx_codepage.cpp.

Referenced by CPDF_DocPageData::AddFont().