2010-12-29 20:25:30 +00:00
|
|
|
|
|
|
|
#ifndef UTF8_H_
|
|
|
|
#define UTF8_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup string_types
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Type STRING
|
2010-12-30 01:47:14 +00:00
|
|
|
* holds a sequence of 8 bit bytes that represent a sequence of variable
|
|
|
|
* length multi-byte international characters, with unspecified encoding.
|
2010-12-29 20:25:30 +00:00
|
|
|
*/
|
|
|
|
typedef std::string STRING;
|
|
|
|
|
2010-12-30 01:47:14 +00:00
|
|
|
/**
|
|
|
|
* Type STRINGS
|
|
|
|
* is an "array like" list of STRINGs
|
|
|
|
*/
|
|
|
|
typedef std::deque<STRING> STRINGS;
|
2010-12-29 20:25:30 +00:00
|
|
|
|
|
|
|
/**
|
2010-12-30 01:47:14 +00:00
|
|
|
* Type STR_UTF
|
2010-12-29 20:25:30 +00:00
|
|
|
* 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.
|
2010-12-30 01:47:14 +00:00
|
|
|
* STR_UTF is UTF8 encoded, by definition.
|
2010-12-29 20:25:30 +00:00
|
|
|
*/
|
2010-12-30 01:47:14 +00:00
|
|
|
typedef STRING STR_UTF;
|
2010-12-29 20:25:30 +00:00
|
|
|
|
|
|
|
/**
|
2010-12-30 01:47:14 +00:00
|
|
|
* Type STR_UTFS
|
|
|
|
* is an "array like" list of STR_UTFs
|
2010-12-29 20:25:30 +00:00
|
|
|
*/
|
2010-12-30 01:47:14 +00:00
|
|
|
typedef std::deque<STRING> STR_UTFS;
|
2010-12-29 20:25:30 +00:00
|
|
|
|
|
|
|
/** @} 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_
|