def atof(value):
    """
    locale.atof() on unicode string fails in some environments, like Czech.
    """
    val = str(value)
    try:
        return float(val)
    except ValueError:
        try:
            return float(val.replace(',', '.'))
        except __HOLE__:
            pass

    if isinstance(value, unicode):
        value = value.encode("utf-8")
    return locale.atof(value)
dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/utils.py/atof