Talk:Encodings and Regimes - Old Content

From Wiki
Revision as of 22:21, 5 January 2005 by Adam (talk | contribs)
Jump to navigation Jump to search

How to obtain a Unicode charecter by using its decimal code ? -- Quy

The simplest way is to split the 16 bits into its component 2 bytes: +U1ED5 -> \uchar{"1E}{"D5} -> \uchar{30}{213}. --Adam 20:07, 1 Jan 2005 (CET)

After loading Vietnamese UTF8 (your description) I try:

\starttext
\uchar{30}{160} % 1EA0
\stoptext

But there is error:

 kpathsea: Running mktextfm UnicodeRegular1e
 /work/apps/tetex/share/texmf/web2c/mktexnam: Could not map source abbreviation U for UnicodeRegular1e.
 /work/apps/tetex/share/texmf/web2c/mktexnam: Need to update        
 /work/apps/tetex/share/texmf-dist/fonts/map/fontname/special.map?
 mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input UnicodeRegular1e
 This is METAFONT, Version 2.71828 (Web2C 7.5.4)

 kpathsea: Running mktexmf UnicodeRegular1e
 ! I can't find file `UnicodeRegular1e'.
 <*> ...mag:=1; nonstopmode; input UnicodeRegular1e
                                                  
 Please type another input file name
 ! Emergency stop.
 <*> ...mag:=1; nonstopmode; input UnicodeRegular1e
                                                
 Transcript written on mfput.log.
 grep: UnicodeRegular1e.log: No such file or directory
 mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input UnicodeRegular1e' failed to make       

 UnicodeRegular1e.tfm.
 kpathsea: Appending font creation commands to missfont.log.
 ! Font \unicodefont=UnicodeRegular1e at 12.0pt not loadable: Metric (TFM) file 
 not found.
  \bodyfontsize 
                              
 \unicodeglyph ... \currentfontscale \bodyfontsize 
                                                  \unicodestrut \unicodefont...

 \uchar ... \unicodetwo \relax \handleunicodeglyph 
                                                  \egroup 
 l.4 \uchar{30}{160}
                   
 ?

Any ideas ? Thanks. Quy

Sorry. \uchar is for output. \utfunifontglyph{"1ED5} (hex) ought to do it. (assuming you have VN setup). --Adam 23:19, 5 Jan 2005 (CET)