MCPcopy Create free account
hub / github.com/WinMerge/winmerge / SetUnicoding

Method SetUnicoding

Src/FileTextEncoding.cpp:49–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void FileTextEncoding::SetUnicoding(ucr::UNICODESET unicoding)
50{
51 m_unicoding = unicoding;
52 switch (unicoding)
53 {
54 case ucr::NONE:
55 switch (m_codepage)
56 {
57 case ucr::CP_UTF_8:
58 case ucr::CP_UCS2LE:
59 case ucr::CP_UCS2BE:
60 m_codepage = 0; // not sure what to do here
61 break;
62 }
63 break;
64 case ucr::UTF8:
65 m_codepage = ucr::CP_UTF_8;
66 break;
67 case ucr::UCS2LE:
68 m_codepage = ucr::CP_UCS2LE;
69 break;
70 case ucr::UCS2BE:
71 m_codepage = ucr::CP_UCS2BE;
72 break;
73 }
74}
75
76/**
77 * @brief Return string representation of encoding, eg "UCS-2LE", or "1252"

Callers 8

WriteFileFunction · 0.45
ParseConflictFileFunction · 0.45
WritePatchFileMethod · 0.45
LoadFilterFileMethod · 0.45
LoadFromFileMethod · 0.45
SaveToFileMethod · 0.45
GuessFunction · 0.45
CreatePatchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected