Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse Search

Direc­tory tex-archive/support/utf2any

+===========+
|  utf2any  |
+===========+

utf2any translates a file encoded in UTF-7 or UTF-8 (Unicode) into any
7- or 8-bit text format. Currently, mapping tables are supplied for
LaTeX, HTML, iso-8859-1, iso-8859-15 and rfc-1345. These tables don't
provide a complete mapping, but they can be easily extended to personal
needs.

Usage: utf2any -7|-8 [-f mapfile] [-v] [-w] [infile]

  -7 : Input is UTF-7
  -8 : Input is UTF-8
  -f : File with definitions of the symbol mappings
  -v : Verbose
  -w : Warning messages

If multiple -f options are given, the files are processed in turn.
If name of mapfile has no path, it will be search for in:
    1. current directory
    2. compiled-in default directory
If no -f option is given, a default mapping will be used.

If no infile is given, the program will read from stdin.


Syntax of symbol map file:
--------------------------

Empty lines, and lines starting with a hash (#) are ignored.


Another mapfile can be included:

    I filename

If filename does not contain a path, it will be searched for in the
following directories:
    1. current directory
    2. the same directory as the file this map was included from


A default mapping for a range of characters can be defined as follows:

    D first last size format
    D first last action

first: Unicode number of first symbol in default range
last: Unicode number of last symbol in default range
size: this should be one of: uchar unsigned ulong
format: a format given to the C printf function to display the symbol.
  The format receives one argument: the code number. This number will be
  cast to one of:
    (unsigned char) if size equals uchar
    (unsigned)      if size equals unsigned
    (long unsigned) if size equals ulong
action: one of:
  #ECHO#  : print the character as is, only possible for codes up to 255
  #SKIP#  : don't print anything
  #SPACE# : print a space

Numbers can be given as:

    Unicode type number: hexadecimal number with prefix U+
    decimal
    octal: number with prefix 0
    hexadecimal: number with prefix 0x


Default ranges take lower precedence than explicit codes (see below),
accept in the range 0 to 255, where they overwrite explicit definitions.
To be safe, define all default mappings before explicit mappings.


Explicit mapping, a number followed by a string:

    number action
    number string

number: a Unicode number, in the same format as with default ranges
action: the same as with default ranges
string: a literal string


+===========+
|  utfcode  |
+===========+

utfcode translates one or more Unicode numbers into UTF-7 and/or UTF-8.

Usage: utfcode [-7|-8] [number...]

 -7 : utf-7 only
 -8 : utf-8 only

Numbers can be given in the same format as in the mapfiles for utf2any.


====================================

(c) Peter Kleiweg 2000
http://www.let.rug.nl/~kleiweg/

This is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

Direc­to­ries

Name Notes
extra
maps
test

Files

Name Size Date Notes
Changes 515 2000-06-22 09:00
Makefile 585 2000-06-22 09:00
README 3075 2000-06-22 09:00
utf2any.c 57486 2000-06-22 09:00
utf2any.exe 17664 2000-06-22 09:00
utf2any.l 20157 2000-06-22 09:00
utfcode.c 6044 2000-06-22 09:00
utfcode.exe 8334 2000-06-22 09:00

Down­load the con­tents of this pack­age in one zip archive (97.4k).

ut­f2any – Con­vert­ing Uni­coded text to LaTeX, HTML, etc

Ut­f2any trans­lates a file en­coded in UTF-7 or UTF-8 (Uni­code) into any 7- or 8-bit text for­mat. Cur­rently, map­ping ta­bles are sup­plied for LaTeX, HTML, ISO 8859-1, ISO 8859-15 and RFC 1345. Th­ese ta­bles don't pro­vide a com­plete map­ping, but they can be eas­ily ex­tended to per­sonal needs.

Pack­age De­tailsut­f2any
Li­censeGNU Gen­eral Public Li­cense
Copy­right2000 Peter Klei­weg
Main­tainerPeter Klei­weg
Topics con­ver­sion be­tween en­cod­ings
Guest Book Sitemap Contact