1/* 2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "ShellInfo.h" 8 9#include <CharacterSet.h> 10#include <CharacterSetRoster.h> 11 12#include "TermConst.h" 13 14using namespace BPrivate ; // BCharacterSet stuff 15 16 17ShellInfo::ShellInfo() 18 : 19 fProcessID(-1), 20 fIsDefaultShell(true), 21 fEncoding(M_UTF8), 22 fEncodingName("UTF-8") 23{ 24} 25 26 27void 28ShellInfo::SetEncoding(int encoding) 29{ 30 fEncoding = encoding; 31 32 const BCharacterSet* charset 33 = BCharacterSetRoster::GetCharacterSetByConversionID(fEncoding); 34 fEncodingName = charset ? charset->GetName() : "UTF-8"; 35} 36