foam to Tecplot360 converter
[OpenFOAM-1.6.x.git] / applications / utilities / postProcessing / dataConversion / foamToTecplot360 / tecio / tecsrc / Q_UNICODE.h
blobb91c2ca65ec21b810fc7022572b391f0f974ecab
1 /*
2 * NOTICE and LICENSE for Tecplot Input/Output Library (TecIO) - OpenFOAM
4 * Copyright (C) 1988-2009 Tecplot, Inc. All rights reserved worldwide.
6 * Tecplot hereby grants OpenCFD limited authority to distribute without
7 * alteration the source code to the Tecplot Input/Output library, known
8 * as TecIO, as part of its distribution of OpenFOAM and the
9 * OpenFOAM_to_Tecplot converter. Users of this converter are also hereby
10 * granted access to the TecIO source code, and may redistribute it for the
11 * purpose of maintaining the converter. However, no authority is granted
12 * to alter the TecIO source code in any form or manner.
14 * This limited grant of distribution does not supersede Tecplot, Inc.'s
15 * copyright in TecIO. Contact Tecplot, Inc. for further information.
17 * Tecplot, Inc.
18 * 3535 Factoria Blvd, Ste. 550
19 * Bellevue, WA 98006, USA
20 * Phone: +1 425 653 1200
21 * http://www.tecplot.com/
25 ******************************************************************
26 ******************************************************************
27 ******* ********
28 ****** (C) 1988-2008 Tecplot, Inc. *******
29 ******* ********
30 ******************************************************************
31 ******************************************************************
35 #if !defined Q_UNICODE_H_
36 # define Q_UNICODE_H_
38 #if defined EXTERN
39 #undef EXTERN
40 #endif
41 #if defined Q_UNICODEMODULE
42 #define EXTERN
43 #else
44 #define EXTERN extern
45 #endif
47 namespace tecplot
49 namespace strutil
52 // functions
53 Boolean_t IsValidUtf8LeadByte(Byte_t ch);
54 Boolean_t IsValidUtf8ContinuingByte(Byte_t ch);
55 Boolean_t IsValidUtf8Byte(Byte_t ch);
57 Boolean_t IsValidUtf8String(const char *str);
58 Boolean_t ShouldConvertWideStringToUtf8String(const wchar_t *str);
59 void InitTranslatedStrings();
60 void CleanUpTranslatedStrings();
62 Boolean_t IsNullOrZeroLengthString(const char *S);
63 Boolean_t IsNullOrZeroLengthString(tecplot::strutil::TranslatedString TS);
65 Boolean_t IsEmptyString(const char *S);
66 Boolean_t IsEmptyString(tecplot::strutil::TranslatedString S);
67 Boolean_t IsEmptyString(const wchar_t* S);
69 #if defined MSWIN
71 std::string LookUpTranslation(std::string& strEnglish);
72 void MsWinInitTranslatedStrings();
74 std::string WStringToString(std::wstring str);
75 std::wstring StringToWString(std::string str);
77 std::wstring MultiByteToWideChar(const char *Utf8Str,
78 unsigned int CodePage);
80 std::string WideCharToMultiByte(const wchar_t *WideStr,
81 unsigned int CodePage);
83 // Conversion
84 std::string WideCharToUtf8(const wchar_t* str);
85 std::wstring Utf8ToWideChar(const char *str);
86 char *getenv(const char *str);
88 #endif
93 #endif