eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
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.

printucddata.cpp 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (C) 2012 Reece H. Dunn
  3. *
  4. * This file is part of ucd-tools.
  5. *
  6. * ucd-tools is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * ucd-tools is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with ucd-tools. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include "ucd/ucd.h"
  20. #include <stdio.h>
  21. const char *get_category_string(ucd::category c)
  22. {
  23. using namespace ucd;
  24. switch (c)
  25. {
  26. case Cc: return "Cc";
  27. case Cf: return "Cf";
  28. case Cn: return "Cn";
  29. case Co: return "Co";
  30. case Cs: return "Cs";
  31. case Ii: return "Ii";
  32. case Ll: return "Ll";
  33. case Lm: return "Lm";
  34. case Lo: return "Lo";
  35. case Lt: return "Lt";
  36. case Lu: return "Lu";
  37. case Mc: return "Mc";
  38. case Me: return "Me";
  39. case Mn: return "Mn";
  40. case Nd: return "Nd";
  41. case Nl: return "Nl";
  42. case No: return "No";
  43. case Pc: return "Pc";
  44. case Pd: return "Pd";
  45. case Pe: return "Pe";
  46. case Pf: return "Pf";
  47. case Pi: return "Pi";
  48. case Po: return "Po";
  49. case Ps: return "Ps";
  50. case Sc: return "Sc";
  51. case Sk: return "Sk";
  52. case Sm: return "Sm";
  53. case So: return "So";
  54. case Zl: return "Zl";
  55. case Zp: return "Zp";
  56. case Zs: return "Zs";
  57. default: return "--";
  58. }
  59. }
  60. int main()
  61. {
  62. for (ucd::codepoint_t c = 0; c <= 0x10FFFF; ++c)
  63. {
  64. const char *category = get_category_string(ucd::lookup_category(c));
  65. ucd::codepoint_t upper = ucd::toupper(c);
  66. ucd::codepoint_t lower = ucd::tolower(c);
  67. ucd::codepoint_t title = ucd::totitle(c);
  68. printf("%06X %s %06X %06X %06X\n", c, category, upper, lower, title);
  69. }
  70. return 0;
  71. }