def graph_char(percentage):
    """Return the glyph representing `percentage` as close as possible.

    :percentage: value to be represented
    :returns: string consisting of the glyph
    """
    if percentage > 1:
        percentage = 1
    # level contains the UTF-8 glyphs that represent percentages.
    level = [' ']
    level.extend([chr(0x2580 + i) for i in range(1, 9)])
    # step is the accuracy of the representation.
    step = 1 / (len(level) - 1)
    # Find the correct glyph.
    for i in range(0, len(level)):
        if percentage < (i + 0.5) * step:
            return level[i]