[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] utf8 to groff_char filter
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] utf8 to groff_char filter |
Date: |
Thu, 11 Oct 2012 09:14:00 +0200 (CEST) |
> Much appreciated, Ralph. What I'm hoping to find, for some value of
> $FOO, is
>
> $ printf '\xe2\x80\x93' | $FOO -f utf-8
> \[en]
The groff glyph list (GGL) is fixed; all entity names can be found in
the source code files
src/libs/libgroff/glyphuni.cpp
src/libs/libgroff/uniglyph.cpp
which map from Unicode values to the GGL and vice versa. For example,
the latter file contains this line (as part of a large array):
{ "2013", "en" },
I think it shouldn't be too difficult to write a small script which
extracts this mapping so that it can be reused in your converter.
Werner