1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef INCLUDED_RTL_TEXTENC_CONTEXT_H 29#include "context.h" 30#endif 31 32/* Unicode Encodings */ 33 34static ImplTextEncodingData const aImplUTF7TextEncodingData 35 = { { NULL, 36 ImplUTF7ToUnicode, 37 ImplUnicodeToUTF7, 38 ImplUTF7CreateUTF7TextToUnicodeContext, 39 ImplUTF7DestroyTextToUnicodeContext, 40 ImplUTF7ResetTextToUnicodeContext, 41 ImplUTF7CreateUnicodeToTextContext, 42 ImplUTF7DestroyUnicodeToTextContext, 43 ImplUTF7ResetUnicodeToTextContext }, 44 1, 45 6, 46 1, 47 0, 48 "iso8859-1", 49 "utf-7", 50 RTL_TEXTENCODING_INFO_CONTEXT 51 | RTL_TEXTENCODING_INFO_UNICODE 52 | RTL_TEXTENCODING_INFO_7BIT 53 | RTL_TEXTENCODING_INFO_MULTIBYTE 54 | RTL_TEXTENCODING_INFO_MIME }; 55 /* SCRIPT_UNICODE, pc code page 850 */ 56 57static ImplTextEncodingData const aImplUTF8TextEncodingData 58 = { { NULL, 59 &ImplConvertUtf8ToUnicode, 60 &ImplConvertUnicodeToUtf8, 61 &ImplCreateUtf8ToUnicodeContext, 62 &ImplDestroyContext, 63 &ImplResetUtf8ToUnicodeContext, 64 &ImplCreateUnicodeToUtf8Context, 65 &ImplDestroyContext, 66 &ImplResetUnicodeToUtf8Context }, 67 1, 68 6, 69 1, 70 0, 71 "iso8859-1", 72 "utf-8", 73 RTL_TEXTENCODING_INFO_ASCII 74 | RTL_TEXTENCODING_INFO_UNICODE 75 | RTL_TEXTENCODING_INFO_MULTIBYTE 76 | RTL_TEXTENCODING_INFO_MIME }; 77 /* SCRIPT_UNICODE, pc code page 850 */ 78 79static char aImplJavaUtf8TextConverterTag; 80 /* The value of this tag is irrelevant. Only its address != NULL is used to 81 distinguish between RTL_TEXTENCODING_UTF8 and 82 RTL_TEXTENCODING_JAVA_UTF8. */ 83 84static ImplTextEncodingData const aImplJavaUtf8TextEncodingData 85 = { { &aImplJavaUtf8TextConverterTag, 86 &ImplConvertUtf8ToUnicode, 87 &ImplConvertUnicodeToUtf8, 88 &ImplCreateUtf8ToUnicodeContext, 89 &ImplDestroyContext, 90 &ImplResetUtf8ToUnicodeContext, 91 &ImplCreateUnicodeToUtf8Context, 92 &ImplDestroyContext, 93 &ImplResetUnicodeToUtf8Context }, 94 1, 95 3, 96 1, 97 0, 98 NULL, 99 NULL, 100 RTL_TEXTENCODING_INFO_UNICODE | RTL_TEXTENCODING_INFO_MULTIBYTE }; 101