Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
21 #if !defined(__SHIFTJIS_H__)
22 #define __SHIFTJIS_H__
24 #if !defined(__E32STD_H__)
28 #if !defined(__CHARCONV_H__)
32 #if !defined(__CONVUTILS_H__)
33 #include <convutils.h>
38 only to be used by CHARCONV plug-in DLLs and by locale-DLLs (Locl::FatUtilityFunctions)
43 IMPORT_C static const TDesC8& ReplacementForUnconvertibleUnicodeCharacters();
44 IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
45 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
46 TDes8& aForeign, const TDesC16& aUnicode,
47 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters);
49 IMPORT_C static TInt ConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
50 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
51 TDes8& aForeign, const TDesC16& aUnicode,
52 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
53 const TArray<CnvUtilities::SCharacterSet>& aArrayOfAdditionalCharacterSets);
55 IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
56 TDes16& aUnicode, const TDesC8& aForeign,
57 TInt& aNumberOfUnconvertibleCharacters,
58 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter);
60 IMPORT_C static TInt ConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
61 TDes16& aUnicode, const TDesC8& aForeign,
62 TInt& aNumberOfUnconvertibleCharacters,
63 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
64 const TArray<CnvUtilities::SMethod>& aArrayOfAdditionalMethods);
67 //static TInt DoConvertToUnicode(TDes16& aUnicode, const TDesC8& aForeign,
68 // TInt& aNumberOfUnconvertibleCharacters,
69 // TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter) ;
71 //static TInt DoConvertFromUnicode(const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
72 // TDes8& aForeign, const TDesC16& aUnicode, CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters) ;
74 static TInt DoConvertFromUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
75 const TDesC8& aReplacementForUnconvertibleUnicodeCharacters,
77 const TDesC16& aUnicode,
78 CCnvCharacterSetConverter::TArrayOfAscendingIndices& aIndicesOfUnconvertibleCharacters,
79 const TArray<CnvUtilities::SCharacterSet>* aArrayOfAdditionalCharacterSets);
80 static TInt DoConvertToUnicode(CCnvCharacterSetConverter::TEndianness aDefaultEndiannessOfForeignCharacters,
82 const TDesC8& aForeign,
83 TInt& aNumberOfUnconvertibleCharacters,
84 TInt& aIndexOfFirstByteOfFirstUnconvertibleCharacter,
85 const TArray<CnvUtilities::SMethod>* aArrayOfAdditionalMethods);
86 static void DummyConvertFromIntermediateBufferInPlace(TInt aStartPositionInDescriptor,
88 TInt& aNumberOfCharactersThatDroppedOut);
89 static void ConvertFromJisX0208ToShiftJisInPlace(TInt aStartPositionInDescriptor,
91 TInt& aNumberOfCharactersThatDroppedOut);
92 static TInt NumberOfBytesAbleToConvertToJisX0201(const TDesC8& aDescriptor);
93 static TInt NumberOfBytesAbleToConvertToJisX0208(const TDesC8& aDescriptor);
94 static void DummyConvertToIntermediateBufferInPlace(TDes8& aDescriptor);
95 static void ConvertToJisX0208FromShiftJisInPlace(TDes8& aDescriptor);
97 friend class TCombinedArrayOfCharacterSets;
98 friend class TCombinedArrayOfMethods;