Drupal investigation

multibyte.phpt 794B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Multibyte strings
  3. --FILE--
  4. <?php
  5. if (file_exists(dirname(__FILE__) . '/../Table.php')) {
  6. require_once dirname(__FILE__) . '/../Table.php';
  7. } else {
  8. require_once 'Console/Table.php';
  9. }
  10. $table = new Console_Table();
  11. $table->setHeaders(array('Schön', 'Häßlich'));
  12. $table->addData(array(array('Ich', 'Du'), array('Ä', 'Ü')));
  13. echo $table->getTable();
  14. $table = new Console_Table();
  15. $table->addRow(array("I'm from 中国"));
  16. $table->addRow(array("我是中国人"));
  17. $table->addRow(array("I'm from China"));
  18. echo $table->getTable();
  19. ?>
  20. --EXPECT--
  21. +-------+---------+
  22. | Schön | Häßlich |
  23. +-------+---------+
  24. | Ich | Du |
  25. | Ä | Ü |
  26. +-------+---------+
  27. +----------------+
  28. | I'm from 中国 |
  29. | 我是中国人 |
  30. | I'm from China |
  31. +----------------+