Mercurial > hg > orthanc-wsi
diff Resources/Orthanc/Core/Toolbox.h @ 107:a3e8ac8b7256
support for OpenBSD
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Aug 2017 11:10:48 +0200 |
parents | ff0ef01c332c |
children | a18bfe1fdd62 |
line wrap: on
line diff
--- a/Resources/Orthanc/Core/Toolbox.h Wed Mar 22 15:53:48 2017 +0100 +++ b/Resources/Orthanc/Core/Toolbox.h Wed Aug 23 11:10:48 2017 +0200 @@ -45,6 +45,10 @@ # error The macro ORTHANC_ENABLE_BASE64 must be defined #endif +#if !defined(ORTHANC_ENABLE_LOCALE) +# error The macro ORTHANC_ENABLE_LOCALE must be defined +#endif + #if !defined(ORTHANC_ENABLE_MD5) # error The macro ORTHANC_ENABLE_MD5 must be defined #endif @@ -53,10 +57,6 @@ # error The macro ORTHANC_ENABLE_PUGIXML must be defined #endif -#if !defined(BOOST_HAS_REGEX) -# error The macro BOOST_HAS_REGEX must be defined -#endif - /** * NOTE: GUID vs. UUID @@ -132,22 +132,22 @@ void EncodeBase64(std::string& result, const std::string& data); -# if BOOST_HAS_REGEX == 1 bool DecodeDataUriScheme(std::string& mime, std::string& content, const std::string& source); -# endif void EncodeDataUriScheme(std::string& result, const std::string& mime, const std::string& content); #endif +#if ORTHANC_ENABLE_LOCALE == 1 std::string ConvertToUtf8(const std::string& source, Encoding sourceEncoding); std::string ConvertFromUtf8(const std::string& source, Encoding targetEncoding); +#endif bool IsAsciiString(const void* data, size_t size); @@ -161,9 +161,7 @@ Endianness DetectEndianness(); -#if BOOST_HAS_REGEX == 1 std::string WildcardToRegularExpression(const std::string& s); -#endif void TokenizeString(std::vector<std::string>& result, const std::string& source, @@ -206,5 +204,13 @@ bool IsUuid(const std::string& str); bool StartsWithUuid(const std::string& str); + +#if ORTHANC_ENABLE_LOCALE == 1 + void InitializeGlobalLocale(const char* locale); + + void FinalizeGlobalLocale(); + + std::string ToUpperCaseWithAccents(const std::string& source); +#endif } }