# Buggy code
def msg_curse(self, args=None, max_width=None):
    """Return the dict to display in the curse interface."""
    # Init the return message
    ret = []

    # Only process if stats exist and display plugin enable...
    if not self.stats or self.is_disable():
        return ret

    # Max size for the interface name
    name_max_width = max_width - 12

    # Build the string message
    # Header
    msg = "{:{width}}".format("FILE SYS", width=name_max_width)
    ret.append(self.curse_add_line(msg, "TITLE"))
    if args.fs_free_space:
        msg = "{:>7}".format("Free")
    else:
        msg = "{:>7}".format("Used")
    ret.append(self.curse_add_line(msg))
    msg = "{:>7}".format("Total")
    ret.append(self.curse_add_line(msg))

    # Filesystem list (sorted by name)
    for i in sorted(self.stats, key=operator.itemgetter(self.get_key())):
        # New line
        ret.append(self.curse_new_line())
        if i["device_name"] == "" or i["device_name"] == "none":
            mnt_point = i["mnt_point"][-name_max_width + 1 :]
        elif (
            len(i["mnt_point"]) + len(i["device_name"].split("/")[-1])
            <= name_max_width - 3
        ):
            # If possible concatenate mode info... Glances touch inside :)
            mnt_point = i["mnt_point"] + " (" + i["device_name"].split("/")[-1] + ")"
        elif len(i["mnt_point"]) > name_max_width:
            # Cut mount point name if it is too long
            mnt_point = "_" + i["mnt_point"][-name_max_width + 1 :]
        else:
            mnt_point = i["mnt_point"]
        msg = "{:{width}}".format(mnt_point, width=name_max_width)
        ret.append(self.curse_add_line(msg))
        if args.fs_free_space:
            msg = "{:>7}".format(self.auto_unit(i["free"]))
        else:
            msg = "{:>7}".format(self.auto_unit(i["used"]))
        ret.append(
            self.curse_add_line(
                msg,
                self.get_views(item=i[self.get_key()], key="used", option="decoration"),
            )
        )
        msg = "{:>7}".format(self.auto_unit(i["size"]))
        ret.append(self.curse_add_line(msg))

    return ret


# Traceback (UnicodeEncodeError)
Traceback (most recent call last):
File "/usr/local/bin/glances", line 9, in <module>
load_entry_point('Glances==2.11.1', 'console_scripts', 'glances')()
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 134, in main
start(config=config, args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 103, in start
mode.serve_forever()
File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 117, in serve_forever
self.schedule.run()
File "/usr/lib/python2.7/sched.py", line 117, in run
action(*argument)
File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 104, in __serve_forever
self.screen.update(self.stats)
File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 978, in update
self.flush(stats, cs_status=cs_status)
File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 956, in flush
self.display(stats, cs_status=cs_status)
File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 528, in display
__stat_display = self.__get_stat_display(stats, plugin_max_width)
File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 483, in __get_stat_display
args=self.args, max_width=plugin_max_width)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 762, in get_stats_display
'msgdict': self.msg_curse(args),
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_fs.py", line 240, in msg_curse
msg = '{:{width}}'.format(mnt_point, width=fsname_max_width)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 4: ordinal not in range(128)

# Fixed code
def msg_curse(self, args=None, max_width=None):
    """Return the dict to display in the curse interface."""
    # Init the return message
    ret = []

    # Only process if stats exist and display plugin enable...
    if not self.stats or self.is_disable():
        return ret

    # Max size for the interface name
    name_max_width = max_width - 12

    # Build the string message
    # Header
    msg = "{:{width}}".format("FILE SYS", width=name_max_width)
    ret.append(self.curse_add_line(msg, "TITLE"))
    if args.fs_free_space:
        msg = "{:>7}".format("Free")
    else:
        msg = "{:>7}".format("Used")
    ret.append(self.curse_add_line(msg))
    msg = "{:>7}".format("Total")
    ret.append(self.curse_add_line(msg))

    # Filesystem list (sorted by name)
    for i in sorted(self.stats, key=operator.itemgetter(self.get_key())):
        # New line
        ret.append(self.curse_new_line())
        if i["device_name"] == "" or i["device_name"] == "none":
            mnt_point = i["mnt_point"][-name_max_width + 1 :]
        elif (
            len(i["mnt_point"]) + len(i["device_name"].split("/")[-1])
            <= name_max_width - 3
        ):
            # If possible concatenate mode info... Glances touch inside :)
            mnt_point = i["mnt_point"] + " (" + i["device_name"].split("/")[-1] + ")"
        elif len(i["mnt_point"]) > name_max_width:
            # Cut mount point name if it is too long
            mnt_point = "_" + i["mnt_point"][-name_max_width + 1 :]
        else:
            mnt_point = i["mnt_point"]
        msg = "{:{width}}".format(b(mnt_point), width=name_max_width)
        ret.append(self.curse_add_line(msg))
        if args.fs_free_space:
            msg = "{:>7}".format(self.auto_unit(i["free"]))
        else:
            msg = "{:>7}".format(self.auto_unit(i["used"]))
        ret.append(
            self.curse_add_line(
                msg,
                self.get_views(item=i[self.get_key()], key="used", option="decoration"),
            )
        )
        msg = "{:>7}".format(self.auto_unit(i["size"]))
        ret.append(self.curse_add_line(msg))

    return ret