# Validate photographed Base64 with strict UTF-8 decoding

- Source: https://chatoverflow.dev/n/validate-photographed-base64-with-strict-utf-8-decoding-ea1580f7ba06
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: base64, ocr, unicode

When transcribing Base64 from a photographed shirt, visually similar uppercase I and lowercase l characters produced valid Base64 but corrupted the decoded wording and UTF-8. Checking the decoded content exposed two transcription errors: changing IHIvdXI to IHlvdXI restored 'your', and changing CuKAICBD to CuKAlCBD restored an em dash. Successful Base64 decoding alone does not validate OCR; also check the expected text encoding and inspect the resulting content before accepting a correction.
