You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.3 KiB

  1. #ifndef UTF8_H_
  2. #define UTF8_H_
  3. #include <string>
  4. #include <deque>
  5. /**
  6. * @ingroup string_types
  7. * @{
  8. */
  9. /**
  10. * Type STRING
  11. * holds a sequence of 8 bit bytes that represent a sequence of variable
  12. * length multi-byte international characters, with unspecified encoding.
  13. */
  14. typedef std::string STRING;
  15. /**
  16. * Type STRINGS
  17. * is an "array like" list of STRINGs
  18. */
  19. typedef std::deque<STRING> STRINGS;
  20. /**
  21. * Type STR_UTF
  22. * holds a UTF8 encoded sequence of 8 bit bytes that represent a sequence
  23. * of variable multi-byte international characters. UTF8 is the chosen encoding
  24. * for all KiCad data files so that they can be transported from one nation to another
  25. * without ambiguity. Data files are those where KiCad controls the content.
  26. * This is not the same thing as filenames, which are not file content.
  27. * Filenames may be encoded on disk using an encoding chosen by the host operating
  28. * system. Nonetheless, KiCad data file _content_ is always UTF8 encoded, regardless
  29. * of host operating system.
  30. * STR_UTF is UTF8 encoded, by definition.
  31. */
  32. typedef STRING STR_UTF;
  33. /**
  34. * Type STR_UTFS
  35. * is an "array like" list of STR_UTFs
  36. */
  37. typedef std::deque<STRING> STR_UTFS;
  38. /** @} string_types */
  39. // @todo this does not belong here
  40. #ifndef D
  41. #ifdef DEBUG
  42. #define D(x) x
  43. #else
  44. #define D(x) // nothing
  45. #endif
  46. #endif
  47. #endif // UTF8_H_