Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jesterjunk/405384d961a960aa55eb2c03ec228470 to your computer and use it in GitHub Desktop.

Select an option

Save jesterjunk/405384d961a960aa55eb2c03ec228470 to your computer and use it in GitHub Desktop.
character maps for illegal filename character replacement

character map for illegal filename character replacement



plain text find replace pairs smallest string

\⧵//::**??""<<>>||

escaped

\⧵\//::**??\""<<>>||


regex

[\⧵]|[\/]|[\:]|[\*]|[\?]|[\"]|[\<]|[\>]|[\|]


json v00 minified

[{"\\":"","U+29F5":"Unicode Character 'REVERSE SOLIDUS OPERATOR' (U+29F5)"},{"/":"","U+FF0F":"Unicode Character 'FULLWIDTH SOLIDUS' (U+FF0F)"},{":":"","U+FF1A":"Unicode Character 'FULLWIDTH COLON' (U+FF1A)"},{"*":"","U+FF0A":"Unicode Character 'FULLWIDTH ASTERISK' (U+FF0A)"},{"?":"","U+FF1F":"Unicode Character 'FULLWIDTH QUESTION MARK' (U+FF1F)"},{"\"":"","U+FF02":"Unicode Character 'FULLWIDTH QUOTATION MARK' (U+FF02)"},{"<":"","U+FF1C":"Unicode Character 'FULLWIDTH LESS-THAN SIGN' (U+FF1C)"},{">":"","U+FF1E":"Unicode Character 'FULLWIDTH GREATER-THAN SIGN' (U+FF1E)"},{"|":"","U+FF5C":"Unicode Character 'FULLWIDTH VERTICAL LINE' (U+FF5C)"}]


json v00 compact

[
{"\\": "", "U+29F5": "Unicode Character 'REVERSE SOLIDUS OPERATOR' (U+29F5)"},
{ "/": "", "U+FF0F": "Unicode Character 'FULLWIDTH SOLIDUS' (U+FF0F)"},
{ ":": "", "U+FF1A": "Unicode Character 'FULLWIDTH COLON' (U+FF1A)"},
{ "*": "", "U+FF0A": "Unicode Character 'FULLWIDTH ASTERISK' (U+FF0A)"},
{ "?": "", "U+FF1F": "Unicode Character 'FULLWIDTH QUESTION MARK' (U+FF1F)"},
{"\"": "", "U+FF02": "Unicode Character 'FULLWIDTH QUOTATION MARK' (U+FF02)"},
{ "<": "", "U+FF1C": "Unicode Character 'FULLWIDTH LESS-THAN SIGN' (U+FF1C)"},
{ ">": "", "U+FF1E": "Unicode Character 'FULLWIDTH GREATER-THAN SIGN' (U+FF1E)"},
{ "|": "", "U+FF5C": "Unicode Character 'FULLWIDTH VERTICAL LINE' (U+FF5C)"}
]


json v00 pretty

[
    {
        "\\": "",
        "U+29F5": "Unicode Character 'REVERSE SOLIDUS OPERATOR' (U+29F5)"
    },
    {
        "/": "",
        "U+FF0F": "Unicode Character 'FULLWIDTH SOLIDUS' (U+FF0F)"
    },
    {
        ":": "",
        "U+FF1A": "Unicode Character 'FULLWIDTH COLON' (U+FF1A)"
    },
    {
        "*": "",
        "U+FF0A": "Unicode Character 'FULLWIDTH ASTERISK' (U+FF0A)"
    },
    {
        "?": "",
        "U+FF1F": "Unicode Character 'FULLWIDTH QUESTION MARK' (U+FF1F)"
    },
    {
        "\"": "",
        "U+FF02": "Unicode Character 'FULLWIDTH QUOTATION MARK' (U+FF02)"
    },
    {
        "<": "",
        "U+FF1C": "Unicode Character 'FULLWIDTH LESS-THAN SIGN' (U+FF1C)"
    },
    {
        ">": "",
        "U+FF1E": "Unicode Character 'FULLWIDTH GREATER-THAN SIGN' (U+FF1E)"
    },
    {
        "|": "",
        "U+FF5C": "Unicode Character 'FULLWIDTH VERTICAL LINE' (U+FF5C)"
    }
]


json v01 minified

[{"find":{"filename_legal":"no","glyph":"\\","unicode_codepoint":"U+005C","description":"REVERSE SOLIDUS","html_entities":{"decimal":"&#92;","hexadecimal":"&#x5C;","named":"&bsol;"}},"replace":{"filename_legal":"yes","glyph":"⧵","unicode_codepoint":"U+29F5","description":"REVERSE SOLIDUS OPERATOR","html_entities":{"decimal":"&#10741;","hexadecimal":"&#x29F5;","named":""}}},{"find":{"filename_legal":"no","glyph":"/","unicode_codepoint":"U+002F","description":"SOLIDUS","html_entities":{"decimal":"&#47;","hexadecimal":"&#x2F;","named":"&sol;"}},"replace":{"filename_legal":"yes","glyph":"/","unicode_codepoint":"U+FF0F","description":"FULLWIDTH SOLIDUS","html_entities":{"decimal":"&#65295;","hexadecimal":"&#xFF0F;","named":""}}},{"find":{"filename_legal":"no","glyph":":","unicode_codepoint":"U+003A","description":"COLON","html_entities":{"decimal":"&#58;","hexadecimal":"&#x3A;","named":"&colon;"}},"replace":{"filename_legal":"yes","glyph":":","unicode_codepoint":"U+FF1A","description":"FULLWIDTH COLON","html_entities":{"decimal":"&#65306;","hexadecimal":"&#xFF1A;","named":""}}},{"find":{"filename_legal":"no","glyph":"*","unicode_codepoint":"U+002A","description":"ASTERISK","html_entities":{"decimal":"&#42;","hexadecimal":"&#x2A;","named":"&ast;"}},"replace":{"filename_legal":"yes","glyph":"*","unicode_codepoint":"U+FF0A","description":"FULLWIDTH ASTERISK","html_entities":{"decimal":"&#65290;","hexadecimal":"&#xFF0A;","named":""}}},{"find":{"filename_legal":"no","glyph":"?","unicode_codepoint":"U+003F","description":"QUESTION MARK","html_entities":{"decimal":"&#63;","hexadecimal":"&#x3F;","named":"&quest;"}},"replace":{"filename_legal":"yes","glyph":"?","unicode_codepoint":"U+FF1F","description":"FULLWIDTH QUESTION MARK","html_entities":{"decimal":"&#65311;","hexadecimal":"&#xFF1F;","named":""}}},{"find":{"filename_legal":"no","glyph":"\"","unicode_codepoint":"U+0022","description":"QUOTATION MARK","html_entities":{"decimal":"&#34;","hexadecimal":"&#x22;","named":"&quot;"}},"replace":{"filename_legal":"yes","glyph":""","unicode_codepoint":"U+FF02","description":"FULLWIDTH QUOTATION MARK","html_entities":{"decimal":"&#65282;","hexadecimal":"&#xFF02;","named":""}}},{"find":{"filename_legal":"no","glyph":"<","unicode_codepoint":"U+003C","description":"LESS-THAN SIGN","html_entities":{"decimal":"&#60;","hexadecimal":"&#x3C;","named":"&lt;"}},"replace":{"filename_legal":"yes","glyph":"<","unicode_codepoint":"U+FF1C","description":"FULLWIDTH LESS-THAN SIGN","html_entities":{"decimal":"&#65308;","hexadecimal":"&#xFF1C;","named":""}}},{"find":{"filename_legal":"no","glyph":">","unicode_codepoint":"U+003E","description":"GREATER-THAN SIGN","html_entities":{"decimal":"&#62;","hexadecimal":"&#x3E;","named":"&gt;"}},"replace":{"filename_legal":"yes","glyph":">","unicode_codepoint":"U+FF1E","description":"FULLWIDTH GREATER-THAN SIGN","html_entities":{"decimal":"&#65310;","hexadecimal":"&#xFF1E;","named":""}}},{"find":{"filename_legal":"no","glyph":"|","unicode_codepoint":"U+007C","description":"VERTICAL LINE","html_entities":{"decimal":"&#124;","hexadecimal":"&#x7C;","named":"&VerticalLine;"}},"replace":{"filename_legal":"yes","glyph":"|","unicode_codepoint":"U+FF5C","description":"FULLWIDTH VERTICAL LINE","html_entities":{"decimal":"&#65372;","hexadecimal":"&#xFF5C;","named":""}}}]


json v01 compact

[
{
"find":   {"filename_legal": "no",  "glyph": "\\", "unicode_codepoint": "U+005C", "description": "REVERSE SOLIDUS",             "html_entities": {"decimal": "&#92;",    "hexadecimal": "&#x5C;",   "named": "&bsol;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+29F5", "description": "REVERSE SOLIDUS OPERATOR",    "html_entities": {"decimal": "&#10741;", "hexadecimal": "&#x29F5;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  "/", "unicode_codepoint": "U+002F", "description": "SOLIDUS",                     "html_entities": {"decimal": "&#47;",    "hexadecimal": "&#x2F;",   "named": "&sol;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF0F", "description": "FULLWIDTH SOLIDUS",           "html_entities": {"decimal": "&#65295;", "hexadecimal": "&#xFF0F;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  ":", "unicode_codepoint": "U+003A", "description": "COLON",                       "html_entities": {"decimal": "&#58;",    "hexadecimal": "&#x3A;",   "named": "&colon;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF1A", "description": "FULLWIDTH COLON",             "html_entities": {"decimal": "&#65306;", "hexadecimal": "&#xFF1A;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  "*", "unicode_codepoint": "U+002A", "description": "ASTERISK",                    "html_entities": {"decimal": "&#42;",    "hexadecimal": "&#x2A;",   "named": "&ast;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF0A", "description": "FULLWIDTH ASTERISK",          "html_entities": {"decimal": "&#65290;", "hexadecimal": "&#xFF0A;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  "?", "unicode_codepoint": "U+003F", "description": "QUESTION MARK",               "html_entities": {"decimal": "&#63;",    "hexadecimal": "&#x3F;",   "named": "&quest;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF1F", "description": "FULLWIDTH QUESTION MARK",     "html_entities": {"decimal": "&#65311;", "hexadecimal": "&#xFF1F;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph": "\"", "unicode_codepoint": "U+0022", "description": "QUOTATION MARK",              "html_entities": {"decimal": "&#34;",    "hexadecimal": "&#x22;",   "named": "&quot;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF02", "description": "FULLWIDTH QUOTATION MARK",    "html_entities": {"decimal": "&#65282;", "hexadecimal": "&#xFF02;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  "<", "unicode_codepoint": "U+003C", "description": "LESS-THAN SIGN",              "html_entities": {"decimal": "&#60;",    "hexadecimal": "&#x3C;",   "named": "&lt;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF1C", "description": "FULLWIDTH LESS-THAN SIGN",    "html_entities": {"decimal": "&#65308;", "hexadecimal": "&#xFF1C;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  ">", "unicode_codepoint": "U+003E", "description": "GREATER-THAN SIGN",           "html_entities": {"decimal": "&#62;",    "hexadecimal": "&#x3E;",   "named": "&gt;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF1E", "description": "FULLWIDTH GREATER-THAN SIGN", "html_entities": {"decimal": "&#65310;", "hexadecimal": "&#xFF1E;", "named": ""}}
},
{
"find":   {"filename_legal": "no",  "glyph":  "|", "unicode_codepoint": "U+007C", "description": "VERTICAL LINE",               "html_entities": {"decimal": "&#124;",   "hexadecimal": "&#x7C;",   "named": "&VerticalLine;"}},
"replace":{"filename_legal": "yes", "glyph": "",  "unicode_codepoint": "U+FF5C", "description": "FULLWIDTH VERTICAL LINE",     "html_entities": {"decimal": "&#65372;", "hexadecimal": "&#xFF5C;", "named": ""}
}}
]


json v01 pretty

[
    {
        "find": {
            "filename_legal": "no",
            "glyph": "\\",
            "unicode_codepoint": "U+005C",
            "description": "REVERSE SOLIDUS",
            "html_entities": {
                "decimal": "&#92;",
                "hexadecimal": "&#x5C;",
                "named": "&bsol;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+29F5",
            "description": "REVERSE SOLIDUS OPERATOR",
            "html_entities": {
                "decimal": "&#10741;",
                "hexadecimal": "&#x29F5;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "/",
            "unicode_codepoint": "U+002F",
            "description": "SOLIDUS",
            "html_entities": {
                "decimal": "&#47;",
                "hexadecimal": "&#x2F;",
                "named": "&sol;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF0F",
            "description": "FULLWIDTH SOLIDUS",
            "html_entities": {
                "decimal": "&#65295;",
                "hexadecimal": "&#xFF0F;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": ":",
            "unicode_codepoint": "U+003A",
            "description": "COLON",
            "html_entities": {
                "decimal": "&#58;",
                "hexadecimal": "&#x3A;",
                "named": "&colon;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF1A",
            "description": "FULLWIDTH COLON",
            "html_entities": {
                "decimal": "&#65306;",
                "hexadecimal": "&#xFF1A;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "*",
            "unicode_codepoint": "U+002A",
            "description": "ASTERISK",
            "html_entities": {
                "decimal": "&#42;",
                "hexadecimal": "&#x2A;",
                "named": "&ast;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF0A",
            "description": "FULLWIDTH ASTERISK",
            "html_entities": {
                "decimal": "&#65290;",
                "hexadecimal": "&#xFF0A;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "?",
            "unicode_codepoint": "U+003F",
            "description": "QUESTION MARK",
            "html_entities": {
                "decimal": "&#63;",
                "hexadecimal": "&#x3F;",
                "named": "&quest;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF1F",
            "description": "FULLWIDTH QUESTION MARK",
            "html_entities": {
                "decimal": "&#65311;",
                "hexadecimal": "&#xFF1F;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "\"",
            "unicode_codepoint": "U+0022",
            "description": "QUOTATION MARK",
            "html_entities": {
                "decimal": "&#34;",
                "hexadecimal": "&#x22;",
                "named": "&quot;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF02",
            "description": "FULLWIDTH QUOTATION MARK",
            "html_entities": {
                "decimal": "&#65282;",
                "hexadecimal": "&#xFF02;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "<",
            "unicode_codepoint": "U+003C",
            "description": "LESS-THAN SIGN",
            "html_entities": {
                "decimal": "&#60;",
                "hexadecimal": "&#x3C;",
                "named": "&lt;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF1C",
            "description": "FULLWIDTH LESS-THAN SIGN",
            "html_entities": {
                "decimal": "&#65308;",
                "hexadecimal": "&#xFF1C;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": ">",
            "unicode_codepoint": "U+003E",
            "description": "GREATER-THAN SIGN",
            "html_entities": {
                "decimal": "&#62;",
                "hexadecimal": "&#x3E;",
                "named": "&gt;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF1E",
            "description": "FULLWIDTH GREATER-THAN SIGN",
            "html_entities": {
                "decimal": "&#65310;",
                "hexadecimal": "&#xFF1E;",
                "named": ""
            }
        }
    },
    {
        "find": {
            "filename_legal": "no",
            "glyph": "|",
            "unicode_codepoint": "U+007C",
            "description": "VERTICAL LINE",
            "html_entities": {
                "decimal": "&#124;",
                "hexadecimal": "&#x7C;",
                "named": "&VerticalLine;"
            }
        },
        "replace": {
            "filename_legal": "yes",
            "glyph": "",
            "unicode_codepoint": "U+FF5C",
            "description": "FULLWIDTH VERTICAL LINE",
            "html_entities": {
                "decimal": "&#65372;",
                "hexadecimal": "&#xFF5C;",
                "named": ""
            }
        }
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment