Opened 8 years ago

Closed 8 years ago

#53614 closed defect (worksforme)

MacPorts nano will not display Unicode characters

Reported by: miken32 (Michael Newton) Owned by: grimreaper (Eitan Adler)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: nano

Description

I have a test file containing some Korean Unicode characters, which are not displayed correctly in MacPorts' version of nano.

In vi, emacs, TextMate, the OS version of nano (2.0.6), or even when I just cat the file, the characters display correctly:

Hey
*아이템 5000 ec101 db120 da120 dg120
café
Bo

However, in MacPorts nano (2.7.4), it appears like this:

Hey
* u^d }  e^| 5000 ec101 db120 da120 dg120
café
Bo

Here are version strings from both nanos:

mike ~ > /usr/bin/nano --version
 GNU nano version 2.0.6 (compiled 16:13:50, Jul 30 2016)
 Email: nano@nano-editor.org	Web: http://www.nano-editor.org/
 Compiled options: --disable-nls --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

mike ~ > nano --version
 GNU nano, version 2.7.4
 (C) 1999..2016 Free Software Foundation, Inc.
 (C) 2014..2016 the contributors to nano
 Email: nano@nano-editor.org	Web: https://nano-editor.org/
 Compiled options: --disable-wrapping-as-root --enable-utf8

And if it's helpful, here is output from cat -v:

Hey
*?M-^UM-^D?M-^]??M-^EM-^\ 5000 ec101 db120 da120 dg120
café
Bo

Attachments (1)

foo.txt (53 bytes) - added by miken32 (Michael Newton) 8 years ago.
The text file

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: grimreaper removed
Keywords: utf8 removed
Owner: set to grimreaper
Status: newassigned

Changed 8 years ago by miken32 (Michael Newton)

Attachment: foo.txt added

The text file

comment:2 Changed 8 years ago by Schamschula (Marius Schamschula)

I'm a little confused. I can both paste the unicode text into a open MacPorts nano 2.7.4 session (same details as above) under Sierra, and open foo.txt and get the text to properly display.

You also appear to have the same macOS Sierra build of nano, as on my machine. So I'm assuming you are also running Sierra.

BTW: some of the options of the macOS version of nano are the default settings. The actual configure differences are --disable-nls (2.0.6) vs --disable-wrapping-as-root (2.7.4).

comment:3 Changed 8 years ago by miken32 (Michael Newton)

Well I figured it out. I found the line export LANG=en_CA.utf-8 in my .bash_profile but it should have been en_CA.UTF-8 instead. Amazing what problems a couple of lowercase letters can cause! Strange that it only affected this one program.

I tried building 2.7.5 from source and had the same problem, so I think nano is just pickier than most software.

comment:4 Changed 8 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.