def dump_deb822(fields):
    """
    Format the given Debian control fields as text.

    :param fields: The control fields to dump (a dictionary).
    :returns: A Unicode string containing the formatted control fields.
    """
    lines = []
    for key, value in fields.items():
        # Check for multi-line values.
        if "\n" in value:
            input_lines = value.splitlines()
            output_lines = [input_lines.pop(0)]
            for line in input_lines:
                if line and not line.isspace():
                    # Make sure continuation lines are indented.
                    output_lines.append(u" " + line)
                else:
                    # Encode empty continuation lines as a dot (indented).
                    output_lines.append(u" .")
            value = u"\n".join(output_lines)
        lines.append(u"%s: %s\n" % (key, value))
    return u"".join(lines)