[Debichem-devel] Bug#466231: gperiodic: codes in text mode

Daniel Leidert daniel.leidert at wgdd.de
Thu Mar 6 05:24:04 UTC 2008


Am Sonntag, den 17.02.2008, 15:39 +0100 schrieb Daniel Leidert:
> Am Sonntag, den 17.02.2008, 12:28 +0100 schrieb Daniele Sempione:
> 
> > in text mode there is:
> > Density (g/cm<sup>3</sup>) :
> > Atomic Volume (cm<sup>3</sup>/mol):
> > Specific Heat (@20&#176;C J/g mol):
> > Termal Conductivity (@25&#176;C W/m K):
> > Electronic Configuration:               [Ar] 4s<sup>1</sup>
> > Lattice constant (&#x212B;):
> > 
> > these lines contain codes like "<sup>3</sup>" which should be "^3";
> > "&#176;" is "degrees" and "&#x212B;" is "angstroms", I think these appear
> > better in words reather than codes.
> 
> It seems, this is the intended design and not really a bug. I'm therefor
> forwarding your report to Jonas Frantz, the author.
> 
> Hello Jonas,
> 
> Could at least the entities be replaced by ASCII or UTF-8 characters for
> console output?

I have written s small patch based on pango_parse_markup (). It outputs
UTF-8 string without markup and entities are replaced too. The
differences in output are shown in the following diff:

> --- /tmp/test	2008-03-06 06:11:06.000000000 +0100
> +++ /tmp/test2	2008-03-06 06:11:37.000000000 +0100
> @@ -3,24 +3,24 @@
>   Symbol:                                 Cd
>   Atomic Number:                          48
>   Atomic Weight (u.m):                    112.411
> - Density (g/cm<sup>3</sup>) :            8.65
> + Density (g/cm3) :                       8.65
>   Melting Point (K):                      594.1
>   Boiling Point (K):                      1038
>   Atomic Radius (pm):                     154
>   Covalent Radius (pm):                   148
>   Ionic Radius (pm):                      97 (+2e)
> - Atomic Volume (cm<sup>3</sup>/mol):     13.1
> - Specific Heat (@20&#176;C J/g mol):     0.232
> + Atomic Volume (cm3/mol):                13.1
> + Specific Heat (@20°C J/g mol):         0.232
>   Fusion Heat (kJ/mol):                   6.11
>   Evaporation Heat (kJ/mol):              59.1
> - Termal Conductivity (@25&#176;C W/m K): 96.9
> + Termal Conductivity (@25°C W/m K):     96.9
>   Debye temperature (K):                  120.00
>   Pauling Negativity Number:              1.69
>   First Ionizing Energy (kJ/mol):         867.2
>   Oxidation states:                       2
> - Electronic Configuration:               [Kr] 4d<sup>10</sup> 5s<sup>2</sup>
> + Electronic Configuration:               [Kr] 4d10 5s2
>   Lattice structure:                      HEX
> - Lattice constant (&#x212B;):            2.980
> + Lattice constant (Å):                 2.980
                                        ^^^^^^^
>   Lattice c/a ratio:                      1.886
>   Appearance:                             Soft, malleable, blue-white metal
>   Discovery date:                         1817 (Germany)

A problem that is left is, that the filling-stuff doesn't fully work for
special characters with UTF-8 output. Maybe you have some idea.

What's your opinion about this patch?

Regards, Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 466231.patch
Type: text/x-patch
Size: 809 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debichem-devel/attachments/20080306/2665588c/attachment.bin 


More information about the Debichem-devel mailing list