diff options
author | saurabhb17 | 2020-02-26 16:20:48 +0530 |
---|---|---|
committer | GitHub | 2020-02-26 16:20:48 +0530 |
commit | b77f5d9d8097c38159c6f60917995d6af13bbe1c (patch) | |
tree | 1392c90227aeea231c1d86371131e04c40382918 /new/utf8.h | |
parent | dadc4d490966a24efe15b5cc533ef8695986048a (diff) | |
parent | 003d02608917e7a69d1a98438837e94ccf68352a (diff) | |
download | KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.gz KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.tar.bz2 KiCad-eSim-b77f5d9d8097c38159c6f60917995d6af13bbe1c.zip |
Merge pull request #4 from FOSSEE/develop
merging dev into master
Diffstat (limited to 'new/utf8.h')
-rw-r--r-- | new/utf8.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/new/utf8.h b/new/utf8.h new file mode 100644 index 0000000..046d880 --- /dev/null +++ b/new/utf8.h @@ -0,0 +1,59 @@ + +#ifndef UTF8_H_ +#define UTF8_H_ + +#include <string> +#include <deque> + +/** + * @ingroup string_types + * @{ + */ + + +/** + * Type STRING + * holds a sequence of 8 bit bytes that represent a sequence of variable + * length multi-byte international characters, with unspecified encoding. + */ +typedef std::string STRING; + +/** + * Type STRINGS + * is an "array like" list of STRINGs + */ +typedef std::deque<STRING> STRINGS; + +/** + * Type STR_UTF + * holds a UTF8 encoded sequence of 8 bit bytes that represent a sequence + * of variable multi-byte international characters. UTF8 is the chosen encoding + * for all KiCad data files so that they can be transported from one nation to another + * without ambiguity. Data files are those where KiCad controls the content. + * This is not the same thing as filenames, which are not file content. + * Filenames may be encoded on disk using an encoding chosen by the host operating + * system. Nonetheless, KiCad data file _content_ is always UTF8 encoded, regardless + * of host operating system. + * STR_UTF is UTF8 encoded, by definition. + */ +typedef STRING STR_UTF; + +/** + * Type STR_UTFS + * is an "array like" list of STR_UTFs + */ +typedef std::deque<STRING> STR_UTFS; + +/** @} string_types */ + + +// @todo this does not belong here +#ifndef D +#ifdef DEBUG +#define D(x) x +#else +#define D(x) // nothing +#endif +#endif + +#endif // UTF8_H_ |