tcs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .TH TCS 1
  2. .SH NAME
  3. tcs \- translate character sets
  4. .SH SYNOPSIS
  5. .B tcs
  6. [
  7. .B -slcv
  8. ]
  9. [
  10. .B -f
  11. .I ics
  12. ]
  13. [
  14. .B -t
  15. .I ocs
  16. ]
  17. [
  18. .I file ...
  19. ]
  20. .SH DESCRIPTION
  21. .I Tcs
  22. interprets the named
  23. .I file(s)
  24. (standard input default) as a stream of characters from the
  25. .I ics
  26. character set or format, converts them to runes,
  27. and then converts them into a stream of characters from the
  28. .I ocs
  29. character set or format on the standard output.
  30. The default value for
  31. .I ics
  32. and
  33. .I ocs
  34. is
  35. .BR utf ,
  36. the
  37. .SM UTF
  38. encoding described in
  39. .IR utf (6).
  40. The
  41. .B -l
  42. option lists the character sets known to
  43. .IR tcs .
  44. Processing continues in the face of conversion errors (the
  45. .B -s
  46. option prevents reporting of these errors).
  47. The
  48. .B -c
  49. option forces the output to contain only correctly converted characters;
  50. otherwise,
  51. .B 0x80
  52. characters will be substituted for
  53. .SM UTF
  54. encoding errors and
  55. .B 0xFFFD
  56. characters will substituted for unknown characters.
  57. .PP
  58. The
  59. .B -v
  60. option generates various diagnostic and summary information on standard error,
  61. or makes the
  62. .B -l
  63. output more verbose.
  64. .PP
  65. .I Tcs
  66. recognizes an ever changing list of character sets.
  67. In particular, it supports a variety of Russian and Japanese encodings.
  68. Some of the supported encodings are
  69. .TF jis-kanji
  70. .TP
  71. .B utf
  72. The Plan 9
  73. .SM UTF
  74. encoding, known by ISO as UTF-8
  75. .TP
  76. .B utf1
  77. The deprecated original
  78. .SM UTF
  79. encoding from ISO 10646
  80. .TP
  81. .B ascii
  82. 7-bit ASCII
  83. .TP
  84. .B 8859-1
  85. Latin-1 (Central European)
  86. .TP
  87. .B 8859-2
  88. Latin-2 (Czech .. Slovak)
  89. .TP
  90. .B 8859-3
  91. Latin-3 (Dutch .. Turkish)
  92. .TP
  93. .B 8859-4
  94. Latin-4 (Scandinavian)
  95. .TP
  96. .B 8859-5
  97. Part 5 (Cyrillic)
  98. .TP
  99. .B 8859-6
  100. Part 6 (Arabic)
  101. .TP
  102. .B 8859-7
  103. Part 7 (Greek)
  104. .TP
  105. .B 8859-8
  106. Part 8 (Hebrew)
  107. .TP
  108. .B 8859-9
  109. Latin-5 (Finnish .. Portuguese)
  110. .TP
  111. .B html
  112. Unicode as encoded by HTML
  113. .TP
  114. .B koi8
  115. KOI-8 (GOST 19769-74)
  116. .TP
  117. .B jis-kanji
  118. ISO 2022-JP
  119. .TP
  120. .B ujis
  121. EUC-JX: JIS 0208
  122. .TP
  123. .B ms-kanji
  124. Microsoft, or Shift-JIS
  125. .TP
  126. .B jis
  127. (from only) guesses between ISO 2022-JP, EUC or Shift-Jis
  128. .TP
  129. .B gb
  130. Chinese national standard (GB2312-80)
  131. .TP
  132. .B big5
  133. Big 5 (HKU version)
  134. .TP
  135. .B unicode
  136. Unicode Standard 1.0
  137. .TP
  138. .B tis
  139. Thai character set plus
  140. .SM ASCII
  141. (TIS 620-1986)
  142. .TP
  143. .B msdos
  144. IBM PC: CP 437
  145. .TP
  146. .B atari
  147. Atari-ST character set
  148. .SH EXAMPLES
  149. .TP
  150. .B tcs -f 8859-1
  151. Convert 8859-1 (Latin-1) characters into
  152. .SM UTF
  153. format.
  154. .TP
  155. .B tcs -s -f jis
  156. Convert characters encoded in one of several shift JIS encodings into
  157. .SM UTF
  158. format.
  159. Unknown Kanji will be converted into
  160. .B 0xFFFD
  161. characters.
  162. .TP
  163. .B tcs -t html
  164. Convert UTF into character set-independent HTML.
  165. .TP
  166. .B tcs -lv
  167. Print an up to date list of the supported character sets.
  168. .SH SOURCE
  169. .B /sys/src/cmd/tcs
  170. .SH SEE ALSO
  171. .IR ascii (1),
  172. .IR rune (2),
  173. .IR utf (6).