PDF Filename Edge Cases
Before your application even attempts to parse the binary structure of a PDF file, it must successfully save the file to disk or an S3 bucket. Filenames are a notorious source of backend bugs, especially when traversing between Windows, Linux, and MacOS filesystems.
These sample files bypass the document parsing entirely and focus on the upload layer, featuring hostile filenames with extreme character lengths, complex Unicode scripts, and illegal shell characters.
Spaces in filename
A classic edge case to verify shell scripts and URL encoders handle space padding (`%20`) correctly.
Unicode テスト Файл
A filename mixing Latin, Japanese (Katakana), and Cyrillic scripts to ensure complete Unicode support in your storage layer.
Special !@#$%^&() chars
A hostile filename packed with special characters that often trigger Cross-Site Scripting (XSS) filters or break regex validators.
Very Long Filename AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A file with an extremely long name to test database column limits (e.g., VARCHAR(255)) and filesystem MAX_PATH constraints.
Frequently Asked Questions
Use Cases
- Testing S3 or Blob storage upload routines to ensure Unicode characters are correctly URL-encoded.
- Validating filename sanitization scripts to ensure they do not arbitrarily strip valid foreign language characters.
- Testing `MAX_PATH` limitations (260 characters) on legacy Windows servers.