## Repro:
data:text/html,<form accept-charset="utf-32" method=POST enctype="multipart/form-data"><ol><li><a download="file.txt" href="data:text/plain;charset=utf-8,hello world">download</a><li><input type=file name=q><li><input type=submit value=upload></ol></form>
Follow the steps 1/2/3 - download the file (can be anything, name isn't important), select it, then submit.
## Behavior:
Hits ASSERT:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/wtf/text/TextCodecICU.cpp?q=TextCodecICU.cpp&sq=package:chromium&dr&l=657
## Reason:
This call:
ucnv_setSubstChars(m_converterICU, "?", 1, &err);
Fails for non-byte-based encodings (UTF-16/32, but we have a custom UTF-16 codec) because it is expecting a full code unit not just 1 byte.
(In release builds, the filename to upload just becomes the empty string; there's no crash.)
(Not technically blocking the linked bugs)
Comment 1 by jsb...@chromium.org
, Nov 3 2016