Update info files
authorerg <devnull@localhost>
Thu, 28 Apr 2005 19:38:34 +0000 (19:38 +0000)
committererg <devnull@localhost>
Thu, 28 Apr 2005 19:38:34 +0000 (19:38 +0000)
doc/info/attrs.html
doc/info/lang.html

index 496175314e204b47392b2116cfb4ad5a1e9934d7..26559162964d03bcd74785446af65f65ff07c7a6 100644 (file)
@@ -92,6 +92,8 @@ This field indicates which graph component uses the attribute.
  <TR><TD><A NAME=a:center HREF=#d:center>center</A>
 </TD><TD>G</TD><TD><A HREF=#k:bool>bool</A>
 </TD><TD ALIGN="CENTER">false</TD><TD></TD><TD></TD> </TR>
+ <TR><TD><A NAME=a:charset HREF=#d:charset>charset</A>
+</TD><TD>G</TD><TD>string</TD><TD ALIGN="CENTER">"UTF-8"</TD><TD></TD><TD></TD> </TR>
  <TR><TD><A NAME=a:clusterrank HREF=#d:clusterrank>clusterrank</A>
 </TD><TD>G</TD><TD><A HREF=#k:clusterMode>clusterMode</A>
 </TD><TD ALIGN="CENTER">local</TD><TD></TD><TD>dot only</TD> </TR>
@@ -450,6 +452,14 @@ This field indicates which graph component uses the attribute.
 <DT><A NAME=d:center HREF=#a:center><STRONG>center</STRONG></A>
 <DD>  If true, the drawing is centered in the output canvas.
 
+<DT><A NAME=d:charset HREF=#a:charset><STRONG>charset</STRONG></A>
+<DD>  Specifies the character encoding used when interpreting string input
+  as a text label. The other legal value is <TT>"iso-8859-1"</TT> or, 
+  equivalently,
+ <TT>"Latin1"</TT>. The <B>charset</B> attribute is case-insensitive.
+  Note that if the character encoding used in the input does not
+  match the <B>charset</B> value, the resulting output may be very strange.
+
 <DT><A NAME=d:clusterrank HREF=#a:clusterrank><STRONG>clusterrank</STRONG></A>
 <DD>  Mode used for handling clusters. If <B>clusterrank</B> is "local", a
   subgraph whose name begins with "cluster" is given special treatment.
index 131470f23c36671e67b407a2698bae6979a409a7..438c2fa3e1f3ad2b7c9d3031f2ab176a9d0819d7 100644 (file)
@@ -173,5 +173,30 @@ than listing the graph attribute at the top of the graph, and the
 resetting the attribute as needed in the subgraphs, one can simple defer
 the attribute definition if the graph until the appropriate subgraphs
 have been defined.
+<H2>Character encodings</H2>
+The DOT language assumes at least the ascii character set.
+Quoted strings, both ordinary and HTML-like, may contain non-ascii characters.
+In most cases, these strings are uninterpreted: they simply serve as
+unique identifiers or values passed through untouched. Labels, however,
+are meant to be displayed, which requires that the software be able to
+compute the size of the text and determine the appropriate glyphs. 
+For this, it needs to know what character encoding is used.
+<P>
+By default, DOT assumes the UTF-8 character encoding. It also accepts
+the Latin1 (ISO-8859-1) character set, assuming the input graph uses
+the <B><A NAME=d:charset HREF=#a:charset>charset</B> attribute to 
+specify this. For graphs using other
+character sets, there are usually programs, such as <TT>iconv</TT>, which
+will translate from one character set to another.
+<P>
+Another way to avoid non-ascii characters in labels is to use HTML entities
+for special characters. During label evaluation, these entities are
+translated into the underlying character. This
+<a HREF="http://www.research.att.com/sw/tools/graphviz/doc/char.html">
+table</a> shows the supported entities, with their Unicode value, a typical
+glyph, and the HTML entity name. Thus, to include a lower-case Greek beta
+into a string, one can use the ascii sequence <TT>&amp;beta;</TT>. 
+In general, one should only use entities that are allowed in the output
+character set, and for which there is a glyph in the font.
 </BODY>
 </HTML>