sl@0: /* sl@0: * Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __JISBASE_H__ sl@0: #define __JISBASE_H__ sl@0: sl@0: #if !defined(__E32STD_H__) sl@0: #include sl@0: #endif sl@0: sl@0: #if !defined(__CHARCONV_H__) sl@0: #include sl@0: #endif sl@0: sl@0: class CnvJisBase sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: { sl@0: public: sl@0: IMPORT_C static void IsCharacterJISBased(TInt& aConfidenceLevel, const TDesC8& aSample); sl@0: IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, TDes16& aUnicode, const TDesC8& aForeign, TInt& aState, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter); sl@0: IMPORT_C static const SCnvConversionData& HalfWidthKatakana7ConversionData(); sl@0: private: sl@0: static TInt ChangeToNonStandardStateJis7(TInt aState); sl@0: static TInt ChangeToNonStandardStateJis8(TInt aState); sl@0: static TInt ChangeToStandardState(TInt aState); sl@0: static TInt AppendConvertToUnicodeFromModalForeign(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, TDes16& aUnicode, const TDesC8& aModalForeign, TInt& aState, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, const TArray& aArrayOfStates, TUint& aOutputConversionFlags, TUint aInputConversionFlags); sl@0: static TInt AppendConvertToUnicodeFromJis7(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, TDes16& aUnicode, const TDesC8& aJis7, TInt&, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, const TArray&, TUint& aOutputConversionFlags, TUint aInputConversionFlags); sl@0: static TInt AppendConvertToUnicodeFromJis8(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters, TDes16& aUnicode, const TDesC8& aJis8, TInt&, TInt& aNumberOfUnconvertibleCharacters, TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter, const TArray&, TUint& aOutputConversionFlags, TUint aInputConversionFlags); sl@0: }; sl@0: sl@0: #endif sl@0: