[AstroPy] "ASCII" tables that contain non-ASCII characters

Paul Kuin npkuin at gmail.com
Mon Oct 24 18:06:45 EDT 2016


Complain to NIST, I think is the best approach. ASCII is well-defined.

On Mon, Oct 24, 2016 at 10:45 PM, Benjamin Alan Weaver <baweaver at lbl.gov> wrote:
> Hello y'all,
>
> We are trying to read "ASCII" tables containing atomic line data
> provided by NIST.  When you request the line wavelength data in
> angstroms, NIST very helpfully labels the columns with the angstrom
> symbol (Å), which is not strictly part of the ASCII character set.
>
> We can read these tables with Table.read() *and* the environment
> variable LANG=en_US.utf-8 set.  However, if LANG is not set,
> Table.read() fails to decode these files.
>
> As far as I can tell the underlying read() function in astropy.io.ascii
> does not accept keywords related to the file encoding.
>
> So two questions:
>
> 1. Is the lack of an encoding keyword a bug that should be reported?
>
> 2. Is there a workaround that does not rely on LANG being set?
>
> Kia ora koutou,
> Benjamin Alan Weaver
>
> --
> We can lick gravity, but sometimes the paperwork is overwhelming.
>   --Wernher von Braun
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> https://mail.scipy.org/mailman/listinfo/astropy



-- 

* * * * * * * * http://www.mssl.ucl.ac.uk/~npmk/ * * * *
Dr. N.P.M. Kuin      (n.kuin at ucl.ac.uk)
phone +44-(0)1483 (prefix) -204111 (work)
mobile +44(0)7908715953  skype ID: npkuin
Mullard Space Science Laboratory  – University College London  –
Holmbury St Mary – Dorking – Surrey RH5 6NT–  U.K.



More information about the AstroPy mailing list