print.data.frame(), wrong column names alignement, UTF-8 (PR#7804)
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --27464147-1314679168-1114090679=:19546 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Thank you for the report (which has to be viewed in UTF-8 ...). That was overlooked (and did not crop up in beta testing): We will fix=20 for R-patched shortly.
On Thu, 21 Apr 2005 cyril.humbert@univ-mlv.fr wrote:
Hello, When a data.frame contains column names with accentued characters (UTF8 encoded), the alignement of the column names is wrong (extra spaces inserted). For example : ------------------------------------------------
Sys.getlocale()
[1] "LC_CTYPE=3Dfr_FR.UTF-8@euro;LC_NUMERIC=3DC;LC_TIME=3Dfr_FR.UTF-8@eur=
o;LC_COLLATE=3Dfr_FR.UTF-8@euro;LC_MONETARY=3Dfr_FR.UTF-8@euro;LC_MESSAGES= =3Dfr_FR.UTF-8@euro;LC_PAPER=3DC;LC_NAME=3DC;LC_ADDRESS=3DC;LC_TELEPHONE=3D= C;LC_MEASUREMENT=3DC;LC_IDENTIFICATION=3DC"
print (data.frame(aaaa=3D1, b=3D2, c=3D3)) # (ok)
aaaa b c 1 1 2 3
print (data.frame(=C3=A9=C3=A9=C3=A9=C3=A9=3D1, b=3D2, c=3D3)) # (extra =
blanks)
=C3=A9=C3=A9=C3=A9=C3=A9 b c 1 1 2 3 -------------------------------------------------------------- This is probably due to fact that the number of white spaces to insert between the columns is computed using the length of the column names (in bytes) instead of their width (in characters), which are different in the example above. The problem is the same (extra spaces inserted) with print.data.frame(..., right =3D FALSE). Thanks, Cyril --please do not edit the information below-- Version: platform =3D i386-pc-linux-gnu arch =3D i386 os =3D linux-gnu system =3D i386, linux-gnu status =3D major =3D 2 minor =3D 1.0 year =3D 2005 month =3D 04 day =3D 18 language =3D R Search Path: .GlobalEnv, package:methods, package:stats, package:graphics, package:grD=
evices, package:utils, package:datasets, Autoloads, package:base
______________________________________________ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
--=20 Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 --27464147-1314679168-1114090679=:19546--