3ds Max C++ API Reference
MaxSDK::Util::TextFile Namespace Reference

Classes

class  BaseTextReader
 This class is the base for all text file readers. More...
 
class  BaseTextWriter
 This class is the base for all text file writers. More...
 
class  Reader
 Reads and interprets text files. More...
 
class  Writer
 Write Text files. More...
 
class  ReaderWriter
 This class is used to access text file with both reader and writer functionality. More...
 

Enumerations

enum  LineEndMode { Unchanged , Enforce_CRLF , Enforce_LF , Text = Enforce_CRLF }
 LineEndMode is used to control how text file end of line characters are handled. More...
 

Functions

UtilExport bool GetCodePageNumberFromString (const MCHAR *codePageName, unsigned int &codePage)
 Convert the codepage name string to the codepage number in codPageTable. More...
 

Enumeration Type Documentation

◆ LineEndMode

LineEndMode is used to control how text file end of line characters are handled.

Enumerator
Unchanged 

When reading or writing a file, don't alter the end of line character sequence.

Enforce_CRLF 

When reading or writing a file, ensure that all lines are terminated by the CRLF characters sequence.

Enforce_LF 

When reading or writing a file, ensure that all lines are terminated by the LF character.

Text 
337  {
341  Unchanged,
342 
346  Enforce_CRLF,
347 
351  Enforce_LF,
352 
353  /* On Windows, the standard text is CRLF. */
355 };
@ Unchanged
When reading or writing a file, don't alter the end of line character sequence.
Definition: maxtextfile.h:341
@ Text
Definition: maxtextfile.h:354
@ Enforce_CRLF
When reading or writing a file, ensure that all lines are terminated by the CRLF characters sequence.
Definition: maxtextfile.h:346
@ Enforce_LF
When reading or writing a file, ensure that all lines are terminated by the LF character.
Definition: maxtextfile.h:351

Function Documentation

◆ GetCodePageNumberFromString()

UtilExport bool MaxSDK::Util::TextFile::GetCodePageNumberFromString ( const MCHAR codePageName,
unsigned int codePage 
)

Convert the codepage name string to the codepage number in codPageTable.

Parameters
codePageNameThe name of the code page
codePagenumber corresponding to the input name
Returns
True if the input codepage name is found

The codepage numbers corresponding to the codepage names: {_M("utf-8"), CP_UTF8}, {_M("windows-1252"), 1252}, {_M("iso-8859-13"), 28603}, {_M("iso-8859-15"), 28605}, {_M("iso-8859-1"), 28591}, {_M("iso-8859-2"), 28592}, {_M("iso-8859-3"), 28593}, {_M("iso-8859-4"), 28594}, {_M("iso-8859-5"), 28595}, {_M("iso-8859-6"), 28596}, {_M("iso-8859-7"), 28597}, {_M("iso-8859-8"), 28598}, {_M("iso-8859-9"), 28599}, // Asiatic code pages. {_M("koi8-r"), 20866}, // Russian (KOI8-R); Cyrillic (KOI8-R) {_M("iso-2022-kr"), 50225}, // ISO 2022 Korean {_M("iso-2022-jp"), 50222}, // ISO 2022 Japanese JIS X 0201-1989; Japanese (JIS-Allow 1 byte Kana - SO/SI) {_M("shift_jis"), 932}, // ANSI/OEM Japanese; Japanese (Shift-JIS) {_M("gb2312"), 936}, // ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312) {_M("ks_c_5601"), 949}, // ANSI/OEM Korean (Unified Hangul Code) {_M("big5"), 950}, // ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) {_M("utf-16"), 65012}, {NULL, 0},