2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FBaseUtil_IcuConverter.h
19 * @brief This is the header file for _ICUConverter.
22 #ifndef _FBASE_UTIL_ICU_CONVERTER_H_
23 #define _FBASE_UTIL_ICU_CONVERTER_H_
25 #include "unicode/ucnv.h"
26 #include "unicode/utypes.h"
27 #include <FBaseUtilTypes.h>
28 #include <FBaseString.h>
31 namespace Tizen { namespace Base { namespace Utility
39 bool OpenConverter(const Tizen::Base::String& encodingScheme);
40 wchar_t* ConvertToUcharN(const char* src, int srcLength);
41 char* ConvertFromUcharN(const wchar_t* pSrc, int srcLength, int& retLength);
42 void CloseConverter(void);
45 result GetResultFromIcuErrorCode(UErrorCode& err);
46 UConverter* __pConverter;
49 char* WcharToUtf8N(const wchar_t* pValue);
50 wchar_t* Utf8ToWcharN(const char* pValue);
52 }}} // Tizen::Base::Utility
54 #endif // _FBASE_UTIL_ICU_CONVERTER_H_