[Wien] wien2wannier with wien2k.14.1
Elias Assmann
elias.assmann at gmail.com
Wed Sep 24 15:03:12 CEST 2014
On 09/24/2014 03:32 AM, Zhu, Jianxin wrote:
> Sorry for disturbing you this afternoon.
It is for me to apologize for inflicting this problem on you (and on
other wien2wannier users, I fear) through my choice to use UTF-8
characters in some wien2wannier messages. I chose to use those
characters because they were nice for formatting the names of orbitals
for the initial projections in `write_inwf' (like Peter's example `z²'),
and because I thought that support for them should be pretty much
universal on any modern system.
Of course I was aware that there might be a few people it would fail
for, but not that it would fail so badly. (You showed that not only are
the Unicode characters displayed wrongly, but ASCII character between
them are deleted: "`-emin X -emax Y'" [substituting apostrophes for the
offending Unicode quote marks] becomes "â"!)
I will shortly provide an ASCIIized version of wien2wannier, and avoid
non-ASCII characters in future versions. (Of course, the Right Thing
would be to make the programs aware of the locale settings and adjust
the messages accordingly, as many tools do these days ...)
> After a few more times of struggling, I pinned down the root cause to be
> with the setting of xterm under x11.
> With the correction, the problem disappears. Of course, we still need to
>
> setenv LANG en_US.UTF-8
>
>
> on the linux cluster if the UTF-8 is not set as default, if we remotely
> log onto it.
On my machine, experimentation shows that it is a question of the locale
settings in effect when the terminal is started. I.e.,
$ unset LANG
$ xterm
gives me a terminal that displays the characters wrongly, but just
changing it in the current shell
[old terminal] $ xterm
[new xterm] $ unset LANG
does not change the behavior.
Also, xterm showed the problem while my standard terminal application
does not.
Elias
More information about the Wien
mailing list