xref: /aoo41x/main/l10ntools/inc/utf8conv.hxx (revision 983d4c8a)
1*983d4c8aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*983d4c8aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*983d4c8aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*983d4c8aSAndrew Rist  * distributed with this work for additional information
6*983d4c8aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*983d4c8aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*983d4c8aSAndrew Rist  * "License"); you may not use this file except in compliance
9*983d4c8aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*983d4c8aSAndrew Rist  *
11*983d4c8aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*983d4c8aSAndrew Rist  *
13*983d4c8aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*983d4c8aSAndrew Rist  * software distributed under the License is distributed on an
15*983d4c8aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*983d4c8aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*983d4c8aSAndrew Rist  * specific language governing permissions and limitations
18*983d4c8aSAndrew Rist  * under the License.
19*983d4c8aSAndrew Rist  *
20*983d4c8aSAndrew Rist  *************************************************************/
21*983d4c8aSAndrew Rist 
22*983d4c8aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // global includes
25cdf0e10cSrcweir #include <rtl/textcvt.h>
26cdf0e10cSrcweir #include <tools/string.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir //
29cdf0e10cSrcweir // class UTF8Converter
30cdf0e10cSrcweir //
31cdf0e10cSrcweir 
32cdf0e10cSrcweir class UTF8Converter
33cdf0e10cSrcweir {
34cdf0e10cSrcweir private:
35cdf0e10cSrcweir 	static void Convert( ByteString &rBuffer, rtl_TextEncoding nSourceENC, rtl_TextEncoding nDestENC );
36cdf0e10cSrcweir 
37cdf0e10cSrcweir public:
38cdf0e10cSrcweir 	static ByteString ConvertToUTF8( const ByteString &rASCII, rtl_TextEncoding nEncoding );
39cdf0e10cSrcweir 	static ByteString ConvertFromUTF8( const ByteString &rUTF8, rtl_TextEncoding nEncoding );
40cdf0e10cSrcweir };
41