* @brief Global utility functions for eVaf
* @author Enar Vaikene
*
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
*
* This file is part of the eVaf C++ cross-platform application development framework.
*
* @li QVariant::Int - base 10 is used;
* @li QVariant::Double - the decimal point is expecte to be '.' regardless which locale is used;
* @li QVariant::Bool - tries to use isTrue() and isFalse() methods; otherwise performs a conversion to QVariant::uint;
- * @li QVariant::Char - if the string begins with "\0x", expects it to be an ASCII code in hex; if the
- * string begins with "\0", expects it to be an ASCII code in oct; otherwise uses the first character in the string;
+ * @li QVariant::Char - if the string begins with "\0x", expects it to be a UTF-16 code in hex; if the
+ * string begins with "\0", expects it to be a UTF-16 code in oct; if the string begins with "&", expects it to
+ * be a numeric character reference ("&#nnnn;" or "&#xhhhh;") or a predefined character entity reference;
+ * otherwise uses the first character in the string;
*/
COMMON_EXPORT QVariant toVariant(QString const & value, QVariant const & defaultValue);
* be output directly as a printable 7-bit character are output as numeric character references. The result can be
* directly inserted into XML or HTML documents and later converted back with the eVaf::Common::strFromEscapedCharArray()
* function.
+ *
+ * For example, "Groß" becomes "Groß".
*/
COMMON_EXPORT QByteArray strToEscapedCharArray(QString const & str);
* directly as printable 7-bit characters are output as numeric character references. The result can be directly
* inserted into XML or HTML documents and later converted back with the eVaf::Common::binFromEscapedCharArray()
* function.
+ *
+ * For example, "Hello\r\n" becomes "Hello
".
*/
COMMON_EXPORT QByteArray binToEscapedCharArray(QByteArray const & src);