11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<meta charset="utf-8"> 31cb0ef41Sopenharmony_ci<title>Upload files in UTF-8 form</title> 41cb0ef41Sopenharmony_ci<link rel="help" 51cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data"> 61cb0ef41Sopenharmony_ci<link rel="help" 71cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist"> 81cb0ef41Sopenharmony_ci<link rel="help" 91cb0ef41Sopenharmony_ci href="https://w3c.github.io/FileAPI/#file-constructor"> 101cb0ef41Sopenharmony_ci<link rel="author" title="Benjamin C. Wiley Sittler" 111cb0ef41Sopenharmony_ci href="mailto:bsittler@chromium.org"> 121cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 131cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 141cb0ef41Sopenharmony_ci<script src="../support/send-file-form-helper.js"></script> 151cb0ef41Sopenharmony_ci<script> 161cb0ef41Sopenharmony_ci'use strict'; 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ciformPostFileUploadTest({ 191cb0ef41Sopenharmony_ci fileNameSource: 'ASCII', 201cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form.txt', 211cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 221cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form.txt', 231cb0ef41Sopenharmony_ci}); 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ciformPostFileUploadTest({ 261cb0ef41Sopenharmony_ci fileNameSource: 'x-user-defined', 271cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-\uF7F0\uF793\uF783\uF7A0.txt', 281cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 291cb0ef41Sopenharmony_ci expectedEncodedBaseName: ( 301cb0ef41Sopenharmony_ci 'file-for-upload-in-form-\xEF\x9F\xB0\xEF\x9E\x93\xEF\x9E\x83\xEF\x9E\xA0.txt'), 311cb0ef41Sopenharmony_ci}); 321cb0ef41Sopenharmony_ci 331cb0ef41Sopenharmony_ciformPostFileUploadTest({ 341cb0ef41Sopenharmony_ci fileNameSource: 'windows-1252', 351cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-☺😂.txt', 361cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 371cb0ef41Sopenharmony_ci expectedEncodedBaseName: ( 381cb0ef41Sopenharmony_ci 'file-for-upload-in-form-\xC3\xA2\xCB\x9C\xC2\xBA\xC3\xB0\xC5\xB8\xCB\x9C\xE2\x80\x9A.txt'), 391cb0ef41Sopenharmony_ci}); 401cb0ef41Sopenharmony_ci 411cb0ef41Sopenharmony_ciformPostFileUploadTest({ 421cb0ef41Sopenharmony_ci fileNameSource: 'JIS X 0201 and JIS X 0208', 431cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-★星★.txt', 441cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 451cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form-\xE2\x98\x85\xE6\x98\x9F\xE2\x98\x85.txt', 461cb0ef41Sopenharmony_ci}); 471cb0ef41Sopenharmony_ci 481cb0ef41Sopenharmony_ciformPostFileUploadTest({ 491cb0ef41Sopenharmony_ci fileNameSource: 'Unicode', 501cb0ef41Sopenharmony_ci fileBaseName: 'file-for-upload-in-form-☺.txt', 511cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 521cb0ef41Sopenharmony_ci expectedEncodedBaseName: 'file-for-upload-in-form-\xE2\x98\xBA\xF0\x9F\x98\x82.txt', 531cb0ef41Sopenharmony_ci}); 541cb0ef41Sopenharmony_ci 551cb0ef41Sopenharmony_ciformPostFileUploadTest({ 561cb0ef41Sopenharmony_ci fileNameSource: 'Unicode', 571cb0ef41Sopenharmony_ci fileBaseName: `file-for-upload-in-form-${kTestChars}.txt`, 581cb0ef41Sopenharmony_ci formEncoding: 'UTF-8', 591cb0ef41Sopenharmony_ci expectedEncodedBaseName: `file-for-upload-in-form-${kTestFallbackUtf8}.txt`, 601cb0ef41Sopenharmony_ci}); 611cb0ef41Sopenharmony_ci 621cb0ef41Sopenharmony_ci</script> 63