README 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. README for Text::Unidecode
  2. Time-stamp: "2001-07-14 02:03:33 MDT"
  3. Text::Unidecode
  4. NAME
  5. Text::Unidecode -- US-ASCII transliterations of Unicode text
  6. SYNOPSIS
  7. use utf8;
  8. use Text::Unidecode;
  9. print unidecode(
  10. "\x{5317}\x{4EB0}\n"
  11. # those are the Chinese characters for Beijing
  12. );
  13. # That prints: Bei Jing
  14. DESCRIPTION
  15. It often happens that you have non-Roman text data in Unicode, but
  16. you can't display it -- usually because you're trying to show it
  17. to a user via an application that doesn't support Unicode, or
  18. because the fonts you need aren't accessible. You could represent
  19. the Unicode characters as "???????" or "\15BA\15A0\1610...", but
  20. that's nearly useless to the user who actually wants to read what
  21. the text says.
  22. What Text::Unidecode provides is a function, `unidecode(...)' that
  23. takes Unicode data and tries to represent it in US-ASCII
  24. characters (i.e., the universally displayable characters between
  25. 0x00 and 0x7F). The representation is almost always an attempt at
  26. *transliteration* -- i.e., conveying, in Roman letters, the
  27. pronunciation expressed by the text in some other writing
  28. system. (See the example in the synopsis.)
  29. See the POD for more information.
  30. REQUIREMENTS
  31. This module requires Perl 5.6.0 or higher. (Earlier Perls apparently
  32. lack the "use utf8" pragma that Text::Unidecode needs.)
  33. I have also observed that 5.6.0's Unicode support is shakey; strongly
  34. consider upgrading to 5.6.1 at least.
  35. INSTALLATION
  36. You install Text::Unidecode, as you would install any perl module
  37. library, by running these commands:
  38. perl Makefile.PL
  39. make
  40. make test
  41. make install
  42. If you want to install a private copy of Text::Unidecode in your home
  43. directory, then you should try to produce the initial Makefile with
  44. something like this command:
  45. perl Makefile.PL LIB=~/perl
  46. See perldoc perlmodinstall for more information on installing modules.
  47. DOCUMENTATION
  48. POD-format documentation is included in Unidecode.pm. POD is readable
  49. with the 'perldoc' utility. See ChangeLog for recent changes.
  50. SUPPORT
  51. Questions, bug reports, useful code bits, and suggestions for
  52. Text::Unidecode should just be sent to me at sburke@cpan.org
  53. AVAILABILITY
  54. The latest version of Text::Unidecode is available from the
  55. Comprehensive Perl Archive Network (CPAN). Visit
  56. <http://www.perl.com/CPAN/> to find a CPAN site near you.
  57. COPYRIGHT
  58. Copyright 2001, Sean M. Burke <sburke@cpan.org>, all rights reserved.
  59. The programs and documentation in this dist are distributed in the
  60. hope that they will be useful, but without any warranty; without even
  61. the implied warranty of merchantability or fitness for a particular
  62. purpose.
  63. This library is free software; you can redistribute it and/or modify
  64. it under the same terms as Perl itself.