1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef INCLUDED_RTL_TEXTENC_CONTEXT_H 25#include "context.h" 26#endif 27 28/* Unicode Encodings */ 29 30static ImplTextEncodingData const aImplUTF7TextEncodingData 31 = { { NULL, 32 ImplUTF7ToUnicode, 33 ImplUnicodeToUTF7, 34 ImplUTF7CreateUTF7TextToUnicodeContext, 35 ImplUTF7DestroyTextToUnicodeContext, 36 ImplUTF7ResetTextToUnicodeContext, 37 ImplUTF7CreateUnicodeToTextContext, 38 ImplUTF7DestroyUnicodeToTextContext, 39 ImplUTF7ResetUnicodeToTextContext }, 40 1, 41 6, 42 1, 43 0, 44 "iso8859-1", 45 "utf-7", 46 RTL_TEXTENCODING_INFO_CONTEXT 47 | RTL_TEXTENCODING_INFO_UNICODE 48 | RTL_TEXTENCODING_INFO_7BIT 49 | RTL_TEXTENCODING_INFO_MULTIBYTE 50 | RTL_TEXTENCODING_INFO_MIME }; 51 /* SCRIPT_UNICODE, pc code page 850 */ 52 53static ImplTextEncodingData const aImplUTF8TextEncodingData 54 = { { NULL, 55 &ImplConvertUtf8ToUnicode, 56 &ImplConvertUnicodeToUtf8, 57 &ImplCreateUtf8ToUnicodeContext, 58 &ImplDestroyContext, 59 &ImplResetUtf8ToUnicodeContext, 60 &ImplCreateUnicodeToUtf8Context, 61 &ImplDestroyContext, 62 &ImplResetUnicodeToUtf8Context }, 63 1, 64 6, 65 1, 66 0, 67 "iso8859-1", 68 "utf-8", 69 RTL_TEXTENCODING_INFO_ASCII 70 | RTL_TEXTENCODING_INFO_UNICODE 71 | RTL_TEXTENCODING_INFO_MULTIBYTE 72 | RTL_TEXTENCODING_INFO_MIME }; 73 /* SCRIPT_UNICODE, pc code page 850 */ 74 75static char aImplJavaUtf8TextConverterTag; 76 /* The value of this tag is irrelevant. Only its address != NULL is used to 77 distinguish between RTL_TEXTENCODING_UTF8 and 78 RTL_TEXTENCODING_JAVA_UTF8. */ 79 80static ImplTextEncodingData const aImplJavaUtf8TextEncodingData 81 = { { &aImplJavaUtf8TextConverterTag, 82 &ImplConvertUtf8ToUnicode, 83 &ImplConvertUnicodeToUtf8, 84 &ImplCreateUtf8ToUnicodeContext, 85 &ImplDestroyContext, 86 &ImplResetUtf8ToUnicodeContext, 87 &ImplCreateUnicodeToUtf8Context, 88 &ImplDestroyContext, 89 &ImplResetUnicodeToUtf8Context }, 90 1, 91 3, 92 1, 93 0, 94 NULL, 95 NULL, 96 RTL_TEXTENCODING_INFO_UNICODE | RTL_TEXTENCODING_INFO_MULTIBYTE }; 97