blob: b79edbd68eb8a4d5b08766c92f6b8bcee4dfeca1 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.32/src/lib.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>lib.rs - source</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="../../source-script.js"></script><script defer src="../../source-files.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><a class="sidebar-logo" href="../../encoding_rs/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a></nav><main><div class="width-limiter"><nav class="sub"><a class="sub-logo-container" href="../../encoding_rs/index.html"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></a><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="example-wrap"><pre class="src-line-numbers"><span id="1">1</span>
<span id="2">2</span>
<span id="3">3</span>
<span id="4">4</span>
<span id="5">5</span>
<span id="6">6</span>
<span id="7">7</span>
<span id="8">8</span>
<span id="9">9</span>
<span id="10">10</span>
<span id="11">11</span>
<span id="12">12</span>
<span id="13">13</span>
<span id="14">14</span>
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
<span id="47">47</span>
<span id="48">48</span>
<span id="49">49</span>
<span id="50">50</span>
<span id="51">51</span>
<span id="52">52</span>
<span id="53">53</span>
<span id="54">54</span>
<span id="55">55</span>
<span id="56">56</span>
<span id="57">57</span>
<span id="58">58</span>
<span id="59">59</span>
<span id="60">60</span>
<span id="61">61</span>
<span id="62">62</span>
<span id="63">63</span>
<span id="64">64</span>
<span id="65">65</span>
<span id="66">66</span>
<span id="67">67</span>
<span id="68">68</span>
<span id="69">69</span>
<span id="70">70</span>
<span id="71">71</span>
<span id="72">72</span>
<span id="73">73</span>
<span id="74">74</span>
<span id="75">75</span>
<span id="76">76</span>
<span id="77">77</span>
<span id="78">78</span>
<span id="79">79</span>
<span id="80">80</span>
<span id="81">81</span>
<span id="82">82</span>
<span id="83">83</span>
<span id="84">84</span>
<span id="85">85</span>
<span id="86">86</span>
<span id="87">87</span>
<span id="88">88</span>
<span id="89">89</span>
<span id="90">90</span>
<span id="91">91</span>
<span id="92">92</span>
<span id="93">93</span>
<span id="94">94</span>
<span id="95">95</span>
<span id="96">96</span>
<span id="97">97</span>
<span id="98">98</span>
<span id="99">99</span>
<span id="100">100</span>
<span id="101">101</span>
<span id="102">102</span>
<span id="103">103</span>
<span id="104">104</span>
<span id="105">105</span>
<span id="106">106</span>
<span id="107">107</span>
<span id="108">108</span>
<span id="109">109</span>
<span id="110">110</span>
<span id="111">111</span>
<span id="112">112</span>
<span id="113">113</span>
<span id="114">114</span>
<span id="115">115</span>
<span id="116">116</span>
<span id="117">117</span>
<span id="118">118</span>
<span id="119">119</span>
<span id="120">120</span>
<span id="121">121</span>
<span id="122">122</span>
<span id="123">123</span>
<span id="124">124</span>
<span id="125">125</span>
<span id="126">126</span>
<span id="127">127</span>
<span id="128">128</span>
<span id="129">129</span>
<span id="130">130</span>
<span id="131">131</span>
<span id="132">132</span>
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
<span id="150">150</span>
<span id="151">151</span>
<span id="152">152</span>
<span id="153">153</span>
<span id="154">154</span>
<span id="155">155</span>
<span id="156">156</span>
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
<span id="166">166</span>
<span id="167">167</span>
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
<span id="196">196</span>
<span id="197">197</span>
<span id="198">198</span>
<span id="199">199</span>
<span id="200">200</span>
<span id="201">201</span>
<span id="202">202</span>
<span id="203">203</span>
<span id="204">204</span>
<span id="205">205</span>
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
<span id="225">225</span>
<span id="226">226</span>
<span id="227">227</span>
<span id="228">228</span>
<span id="229">229</span>
<span id="230">230</span>
<span id="231">231</span>
<span id="232">232</span>
<span id="233">233</span>
<span id="234">234</span>
<span id="235">235</span>
<span id="236">236</span>
<span id="237">237</span>
<span id="238">238</span>
<span id="239">239</span>
<span id="240">240</span>
<span id="241">241</span>
<span id="242">242</span>
<span id="243">243</span>
<span id="244">244</span>
<span id="245">245</span>
<span id="246">246</span>
<span id="247">247</span>
<span id="248">248</span>
<span id="249">249</span>
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
<span id="261">261</span>
<span id="262">262</span>
<span id="263">263</span>
<span id="264">264</span>
<span id="265">265</span>
<span id="266">266</span>
<span id="267">267</span>
<span id="268">268</span>
<span id="269">269</span>
<span id="270">270</span>
<span id="271">271</span>
<span id="272">272</span>
<span id="273">273</span>
<span id="274">274</span>
<span id="275">275</span>
<span id="276">276</span>
<span id="277">277</span>
<span id="278">278</span>
<span id="279">279</span>
<span id="280">280</span>
<span id="281">281</span>
<span id="282">282</span>
<span id="283">283</span>
<span id="284">284</span>
<span id="285">285</span>
<span id="286">286</span>
<span id="287">287</span>
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
<span id="300">300</span>
<span id="301">301</span>
<span id="302">302</span>
<span id="303">303</span>
<span id="304">304</span>
<span id="305">305</span>
<span id="306">306</span>
<span id="307">307</span>
<span id="308">308</span>
<span id="309">309</span>
<span id="310">310</span>
<span id="311">311</span>
<span id="312">312</span>
<span id="313">313</span>
<span id="314">314</span>
<span id="315">315</span>
<span id="316">316</span>
<span id="317">317</span>
<span id="318">318</span>
<span id="319">319</span>
<span id="320">320</span>
<span id="321">321</span>
<span id="322">322</span>
<span id="323">323</span>
<span id="324">324</span>
<span id="325">325</span>
<span id="326">326</span>
<span id="327">327</span>
<span id="328">328</span>
<span id="329">329</span>
<span id="330">330</span>
<span id="331">331</span>
<span id="332">332</span>
<span id="333">333</span>
<span id="334">334</span>
<span id="335">335</span>
<span id="336">336</span>
<span id="337">337</span>
<span id="338">338</span>
<span id="339">339</span>
<span id="340">340</span>
<span id="341">341</span>
<span id="342">342</span>
<span id="343">343</span>
<span id="344">344</span>
<span id="345">345</span>
<span id="346">346</span>
<span id="347">347</span>
<span id="348">348</span>
<span id="349">349</span>
<span id="350">350</span>
<span id="351">351</span>
<span id="352">352</span>
<span id="353">353</span>
<span id="354">354</span>
<span id="355">355</span>
<span id="356">356</span>
<span id="357">357</span>
<span id="358">358</span>
<span id="359">359</span>
<span id="360">360</span>
<span id="361">361</span>
<span id="362">362</span>
<span id="363">363</span>
<span id="364">364</span>
<span id="365">365</span>
<span id="366">366</span>
<span id="367">367</span>
<span id="368">368</span>
<span id="369">369</span>
<span id="370">370</span>
<span id="371">371</span>
<span id="372">372</span>
<span id="373">373</span>
<span id="374">374</span>
<span id="375">375</span>
<span id="376">376</span>
<span id="377">377</span>
<span id="378">378</span>
<span id="379">379</span>
<span id="380">380</span>
<span id="381">381</span>
<span id="382">382</span>
<span id="383">383</span>
<span id="384">384</span>
<span id="385">385</span>
<span id="386">386</span>
<span id="387">387</span>
<span id="388">388</span>
<span id="389">389</span>
<span id="390">390</span>
<span id="391">391</span>
<span id="392">392</span>
<span id="393">393</span>
<span id="394">394</span>
<span id="395">395</span>
<span id="396">396</span>
<span id="397">397</span>
<span id="398">398</span>
<span id="399">399</span>
<span id="400">400</span>
<span id="401">401</span>
<span id="402">402</span>
<span id="403">403</span>
<span id="404">404</span>
<span id="405">405</span>
<span id="406">406</span>
<span id="407">407</span>
<span id="408">408</span>
<span id="409">409</span>
<span id="410">410</span>
<span id="411">411</span>
<span id="412">412</span>
<span id="413">413</span>
<span id="414">414</span>
<span id="415">415</span>
<span id="416">416</span>
<span id="417">417</span>
<span id="418">418</span>
<span id="419">419</span>
<span id="420">420</span>
<span id="421">421</span>
<span id="422">422</span>
<span id="423">423</span>
<span id="424">424</span>
<span id="425">425</span>
<span id="426">426</span>
<span id="427">427</span>
<span id="428">428</span>
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
<span id="437">437</span>
<span id="438">438</span>
<span id="439">439</span>
<span id="440">440</span>
<span id="441">441</span>
<span id="442">442</span>
<span id="443">443</span>
<span id="444">444</span>
<span id="445">445</span>
<span id="446">446</span>
<span id="447">447</span>
<span id="448">448</span>
<span id="449">449</span>
<span id="450">450</span>
<span id="451">451</span>
<span id="452">452</span>
<span id="453">453</span>
<span id="454">454</span>
<span id="455">455</span>
<span id="456">456</span>
<span id="457">457</span>
<span id="458">458</span>
<span id="459">459</span>
<span id="460">460</span>
<span id="461">461</span>
<span id="462">462</span>
<span id="463">463</span>
<span id="464">464</span>
<span id="465">465</span>
<span id="466">466</span>
<span id="467">467</span>
<span id="468">468</span>
<span id="469">469</span>
<span id="470">470</span>
<span id="471">471</span>
<span id="472">472</span>
<span id="473">473</span>
<span id="474">474</span>
<span id="475">475</span>
<span id="476">476</span>
<span id="477">477</span>
<span id="478">478</span>
<span id="479">479</span>
<span id="480">480</span>
<span id="481">481</span>
<span id="482">482</span>
<span id="483">483</span>
<span id="484">484</span>
<span id="485">485</span>
<span id="486">486</span>
<span id="487">487</span>
<span id="488">488</span>
<span id="489">489</span>
<span id="490">490</span>
<span id="491">491</span>
<span id="492">492</span>
<span id="493">493</span>
<span id="494">494</span>
<span id="495">495</span>
<span id="496">496</span>
<span id="497">497</span>
<span id="498">498</span>
<span id="499">499</span>
<span id="500">500</span>
<span id="501">501</span>
<span id="502">502</span>
<span id="503">503</span>
<span id="504">504</span>
<span id="505">505</span>
<span id="506">506</span>
<span id="507">507</span>
<span id="508">508</span>
<span id="509">509</span>
<span id="510">510</span>
<span id="511">511</span>
<span id="512">512</span>
<span id="513">513</span>
<span id="514">514</span>
<span id="515">515</span>
<span id="516">516</span>
<span id="517">517</span>
<span id="518">518</span>
<span id="519">519</span>
<span id="520">520</span>
<span id="521">521</span>
<span id="522">522</span>
<span id="523">523</span>
<span id="524">524</span>
<span id="525">525</span>
<span id="526">526</span>
<span id="527">527</span>
<span id="528">528</span>
<span id="529">529</span>
<span id="530">530</span>
<span id="531">531</span>
<span id="532">532</span>
<span id="533">533</span>
<span id="534">534</span>
<span id="535">535</span>
<span id="536">536</span>
<span id="537">537</span>
<span id="538">538</span>
<span id="539">539</span>
<span id="540">540</span>
<span id="541">541</span>
<span id="542">542</span>
<span id="543">543</span>
<span id="544">544</span>
<span id="545">545</span>
<span id="546">546</span>
<span id="547">547</span>
<span id="548">548</span>
<span id="549">549</span>
<span id="550">550</span>
<span id="551">551</span>
<span id="552">552</span>
<span id="553">553</span>
<span id="554">554</span>
<span id="555">555</span>
<span id="556">556</span>
<span id="557">557</span>
<span id="558">558</span>
<span id="559">559</span>
<span id="560">560</span>
<span id="561">561</span>
<span id="562">562</span>
<span id="563">563</span>
<span id="564">564</span>
<span id="565">565</span>
<span id="566">566</span>
<span id="567">567</span>
<span id="568">568</span>
<span id="569">569</span>
<span id="570">570</span>
<span id="571">571</span>
<span id="572">572</span>
<span id="573">573</span>
<span id="574">574</span>
<span id="575">575</span>
<span id="576">576</span>
<span id="577">577</span>
<span id="578">578</span>
<span id="579">579</span>
<span id="580">580</span>
<span id="581">581</span>
<span id="582">582</span>
<span id="583">583</span>
<span id="584">584</span>
<span id="585">585</span>
<span id="586">586</span>
<span id="587">587</span>
<span id="588">588</span>
<span id="589">589</span>
<span id="590">590</span>
<span id="591">591</span>
<span id="592">592</span>
<span id="593">593</span>
<span id="594">594</span>
<span id="595">595</span>
<span id="596">596</span>
<span id="597">597</span>
<span id="598">598</span>
<span id="599">599</span>
<span id="600">600</span>
<span id="601">601</span>
<span id="602">602</span>
<span id="603">603</span>
<span id="604">604</span>
<span id="605">605</span>
<span id="606">606</span>
<span id="607">607</span>
<span id="608">608</span>
<span id="609">609</span>
<span id="610">610</span>
<span id="611">611</span>
<span id="612">612</span>
<span id="613">613</span>
<span id="614">614</span>
<span id="615">615</span>
<span id="616">616</span>
<span id="617">617</span>
<span id="618">618</span>
<span id="619">619</span>
<span id="620">620</span>
<span id="621">621</span>
<span id="622">622</span>
<span id="623">623</span>
<span id="624">624</span>
<span id="625">625</span>
<span id="626">626</span>
<span id="627">627</span>
<span id="628">628</span>
<span id="629">629</span>
<span id="630">630</span>
<span id="631">631</span>
<span id="632">632</span>
<span id="633">633</span>
<span id="634">634</span>
<span id="635">635</span>
<span id="636">636</span>
<span id="637">637</span>
<span id="638">638</span>
<span id="639">639</span>
<span id="640">640</span>
<span id="641">641</span>
<span id="642">642</span>
<span id="643">643</span>
<span id="644">644</span>
<span id="645">645</span>
<span id="646">646</span>
<span id="647">647</span>
<span id="648">648</span>
<span id="649">649</span>
<span id="650">650</span>
<span id="651">651</span>
<span id="652">652</span>
<span id="653">653</span>
<span id="654">654</span>
<span id="655">655</span>
<span id="656">656</span>
<span id="657">657</span>
<span id="658">658</span>
<span id="659">659</span>
<span id="660">660</span>
<span id="661">661</span>
<span id="662">662</span>
<span id="663">663</span>
<span id="664">664</span>
<span id="665">665</span>
<span id="666">666</span>
<span id="667">667</span>
<span id="668">668</span>
<span id="669">669</span>
<span id="670">670</span>
<span id="671">671</span>
<span id="672">672</span>
<span id="673">673</span>
<span id="674">674</span>
<span id="675">675</span>
<span id="676">676</span>
<span id="677">677</span>
<span id="678">678</span>
<span id="679">679</span>
<span id="680">680</span>
<span id="681">681</span>
<span id="682">682</span>
<span id="683">683</span>
<span id="684">684</span>
<span id="685">685</span>
<span id="686">686</span>
<span id="687">687</span>
<span id="688">688</span>
<span id="689">689</span>
<span id="690">690</span>
<span id="691">691</span>
<span id="692">692</span>
<span id="693">693</span>
<span id="694">694</span>
<span id="695">695</span>
<span id="696">696</span>
<span id="697">697</span>
<span id="698">698</span>
<span id="699">699</span>
<span id="700">700</span>
<span id="701">701</span>
<span id="702">702</span>
<span id="703">703</span>
<span id="704">704</span>
<span id="705">705</span>
<span id="706">706</span>
<span id="707">707</span>
<span id="708">708</span>
<span id="709">709</span>
<span id="710">710</span>
<span id="711">711</span>
<span id="712">712</span>
<span id="713">713</span>
<span id="714">714</span>
<span id="715">715</span>
<span id="716">716</span>
<span id="717">717</span>
<span id="718">718</span>
<span id="719">719</span>
<span id="720">720</span>
<span id="721">721</span>
<span id="722">722</span>
<span id="723">723</span>
<span id="724">724</span>
<span id="725">725</span>
<span id="726">726</span>
<span id="727">727</span>
<span id="728">728</span>
<span id="729">729</span>
<span id="730">730</span>
<span id="731">731</span>
<span id="732">732</span>
<span id="733">733</span>
<span id="734">734</span>
<span id="735">735</span>
<span id="736">736</span>
<span id="737">737</span>
<span id="738">738</span>
<span id="739">739</span>
<span id="740">740</span>
<span id="741">741</span>
<span id="742">742</span>
<span id="743">743</span>
<span id="744">744</span>
<span id="745">745</span>
<span id="746">746</span>
<span id="747">747</span>
<span id="748">748</span>
<span id="749">749</span>
<span id="750">750</span>
<span id="751">751</span>
<span id="752">752</span>
<span id="753">753</span>
<span id="754">754</span>
<span id="755">755</span>
<span id="756">756</span>
<span id="757">757</span>
<span id="758">758</span>
<span id="759">759</span>
<span id="760">760</span>
<span id="761">761</span>
<span id="762">762</span>
<span id="763">763</span>
<span id="764">764</span>
<span id="765">765</span>
<span id="766">766</span>
<span id="767">767</span>
<span id="768">768</span>
<span id="769">769</span>
<span id="770">770</span>
<span id="771">771</span>
<span id="772">772</span>
<span id="773">773</span>
<span id="774">774</span>
<span id="775">775</span>
<span id="776">776</span>
<span id="777">777</span>
<span id="778">778</span>
<span id="779">779</span>
<span id="780">780</span>
<span id="781">781</span>
<span id="782">782</span>
<span id="783">783</span>
<span id="784">784</span>
<span id="785">785</span>
<span id="786">786</span>
<span id="787">787</span>
<span id="788">788</span>
<span id="789">789</span>
<span id="790">790</span>
<span id="791">791</span>
<span id="792">792</span>
<span id="793">793</span>
<span id="794">794</span>
<span id="795">795</span>
<span id="796">796</span>
<span id="797">797</span>
<span id="798">798</span>
<span id="799">799</span>
<span id="800">800</span>
<span id="801">801</span>
<span id="802">802</span>
<span id="803">803</span>
<span id="804">804</span>
<span id="805">805</span>
<span id="806">806</span>
<span id="807">807</span>
<span id="808">808</span>
<span id="809">809</span>
<span id="810">810</span>
<span id="811">811</span>
<span id="812">812</span>
<span id="813">813</span>
<span id="814">814</span>
<span id="815">815</span>
<span id="816">816</span>
<span id="817">817</span>
<span id="818">818</span>
<span id="819">819</span>
<span id="820">820</span>
<span id="821">821</span>
<span id="822">822</span>
<span id="823">823</span>
<span id="824">824</span>
<span id="825">825</span>
<span id="826">826</span>
<span id="827">827</span>
<span id="828">828</span>
<span id="829">829</span>
<span id="830">830</span>
<span id="831">831</span>
<span id="832">832</span>
<span id="833">833</span>
<span id="834">834</span>
<span id="835">835</span>
<span id="836">836</span>
<span id="837">837</span>
<span id="838">838</span>
<span id="839">839</span>
<span id="840">840</span>
<span id="841">841</span>
<span id="842">842</span>
<span id="843">843</span>
<span id="844">844</span>
<span id="845">845</span>
<span id="846">846</span>
<span id="847">847</span>
<span id="848">848</span>
<span id="849">849</span>
<span id="850">850</span>
<span id="851">851</span>
<span id="852">852</span>
<span id="853">853</span>
<span id="854">854</span>
<span id="855">855</span>
<span id="856">856</span>
<span id="857">857</span>
<span id="858">858</span>
<span id="859">859</span>
<span id="860">860</span>
<span id="861">861</span>
<span id="862">862</span>
<span id="863">863</span>
<span id="864">864</span>
<span id="865">865</span>
<span id="866">866</span>
<span id="867">867</span>
<span id="868">868</span>
<span id="869">869</span>
<span id="870">870</span>
<span id="871">871</span>
<span id="872">872</span>
<span id="873">873</span>
<span id="874">874</span>
<span id="875">875</span>
<span id="876">876</span>
<span id="877">877</span>
<span id="878">878</span>
<span id="879">879</span>
<span id="880">880</span>
<span id="881">881</span>
<span id="882">882</span>
<span id="883">883</span>
<span id="884">884</span>
<span id="885">885</span>
<span id="886">886</span>
<span id="887">887</span>
<span id="888">888</span>
<span id="889">889</span>
<span id="890">890</span>
<span id="891">891</span>
<span id="892">892</span>
<span id="893">893</span>
<span id="894">894</span>
<span id="895">895</span>
<span id="896">896</span>
<span id="897">897</span>
<span id="898">898</span>
<span id="899">899</span>
<span id="900">900</span>
<span id="901">901</span>
<span id="902">902</span>
<span id="903">903</span>
<span id="904">904</span>
<span id="905">905</span>
<span id="906">906</span>
<span id="907">907</span>
<span id="908">908</span>
<span id="909">909</span>
<span id="910">910</span>
<span id="911">911</span>
<span id="912">912</span>
<span id="913">913</span>
<span id="914">914</span>
<span id="915">915</span>
<span id="916">916</span>
<span id="917">917</span>
<span id="918">918</span>
<span id="919">919</span>
<span id="920">920</span>
<span id="921">921</span>
<span id="922">922</span>
<span id="923">923</span>
<span id="924">924</span>
<span id="925">925</span>
<span id="926">926</span>
<span id="927">927</span>
<span id="928">928</span>
<span id="929">929</span>
<span id="930">930</span>
<span id="931">931</span>
<span id="932">932</span>
<span id="933">933</span>
<span id="934">934</span>
<span id="935">935</span>
<span id="936">936</span>
<span id="937">937</span>
<span id="938">938</span>
<span id="939">939</span>
<span id="940">940</span>
<span id="941">941</span>
<span id="942">942</span>
<span id="943">943</span>
<span id="944">944</span>
<span id="945">945</span>
<span id="946">946</span>
<span id="947">947</span>
<span id="948">948</span>
<span id="949">949</span>
<span id="950">950</span>
<span id="951">951</span>
<span id="952">952</span>
<span id="953">953</span>
<span id="954">954</span>
<span id="955">955</span>
<span id="956">956</span>
<span id="957">957</span>
<span id="958">958</span>
<span id="959">959</span>
<span id="960">960</span>
<span id="961">961</span>
<span id="962">962</span>
<span id="963">963</span>
<span id="964">964</span>
<span id="965">965</span>
<span id="966">966</span>
<span id="967">967</span>
<span id="968">968</span>
<span id="969">969</span>
<span id="970">970</span>
<span id="971">971</span>
<span id="972">972</span>
<span id="973">973</span>
<span id="974">974</span>
<span id="975">975</span>
<span id="976">976</span>
<span id="977">977</span>
<span id="978">978</span>
<span id="979">979</span>
<span id="980">980</span>
<span id="981">981</span>
<span id="982">982</span>
<span id="983">983</span>
<span id="984">984</span>
<span id="985">985</span>
<span id="986">986</span>
<span id="987">987</span>
<span id="988">988</span>
<span id="989">989</span>
<span id="990">990</span>
<span id="991">991</span>
<span id="992">992</span>
<span id="993">993</span>
<span id="994">994</span>
<span id="995">995</span>
<span id="996">996</span>
<span id="997">997</span>
<span id="998">998</span>
<span id="999">999</span>
<span id="1000">1000</span>
<span id="1001">1001</span>
<span id="1002">1002</span>
<span id="1003">1003</span>
<span id="1004">1004</span>
<span id="1005">1005</span>
<span id="1006">1006</span>
<span id="1007">1007</span>
<span id="1008">1008</span>
<span id="1009">1009</span>
<span id="1010">1010</span>
<span id="1011">1011</span>
<span id="1012">1012</span>
<span id="1013">1013</span>
<span id="1014">1014</span>
<span id="1015">1015</span>
<span id="1016">1016</span>
<span id="1017">1017</span>
<span id="1018">1018</span>
<span id="1019">1019</span>
<span id="1020">1020</span>
<span id="1021">1021</span>
<span id="1022">1022</span>
<span id="1023">1023</span>
<span id="1024">1024</span>
<span id="1025">1025</span>
<span id="1026">1026</span>
<span id="1027">1027</span>
<span id="1028">1028</span>
<span id="1029">1029</span>
<span id="1030">1030</span>
<span id="1031">1031</span>
<span id="1032">1032</span>
<span id="1033">1033</span>
<span id="1034">1034</span>
<span id="1035">1035</span>
<span id="1036">1036</span>
<span id="1037">1037</span>
<span id="1038">1038</span>
<span id="1039">1039</span>
<span id="1040">1040</span>
<span id="1041">1041</span>
<span id="1042">1042</span>
<span id="1043">1043</span>
<span id="1044">1044</span>
<span id="1045">1045</span>
<span id="1046">1046</span>
<span id="1047">1047</span>
<span id="1048">1048</span>
<span id="1049">1049</span>
<span id="1050">1050</span>
<span id="1051">1051</span>
<span id="1052">1052</span>
<span id="1053">1053</span>
<span id="1054">1054</span>
<span id="1055">1055</span>
<span id="1056">1056</span>
<span id="1057">1057</span>
<span id="1058">1058</span>
<span id="1059">1059</span>
<span id="1060">1060</span>
<span id="1061">1061</span>
<span id="1062">1062</span>
<span id="1063">1063</span>
<span id="1064">1064</span>
<span id="1065">1065</span>
<span id="1066">1066</span>
<span id="1067">1067</span>
<span id="1068">1068</span>
<span id="1069">1069</span>
<span id="1070">1070</span>
<span id="1071">1071</span>
<span id="1072">1072</span>
<span id="1073">1073</span>
<span id="1074">1074</span>
<span id="1075">1075</span>
<span id="1076">1076</span>
<span id="1077">1077</span>
<span id="1078">1078</span>
<span id="1079">1079</span>
<span id="1080">1080</span>
<span id="1081">1081</span>
<span id="1082">1082</span>
<span id="1083">1083</span>
<span id="1084">1084</span>
<span id="1085">1085</span>
<span id="1086">1086</span>
<span id="1087">1087</span>
<span id="1088">1088</span>
<span id="1089">1089</span>
<span id="1090">1090</span>
<span id="1091">1091</span>
<span id="1092">1092</span>
<span id="1093">1093</span>
<span id="1094">1094</span>
<span id="1095">1095</span>
<span id="1096">1096</span>
<span id="1097">1097</span>
<span id="1098">1098</span>
<span id="1099">1099</span>
<span id="1100">1100</span>
<span id="1101">1101</span>
<span id="1102">1102</span>
<span id="1103">1103</span>
<span id="1104">1104</span>
<span id="1105">1105</span>
<span id="1106">1106</span>
<span id="1107">1107</span>
<span id="1108">1108</span>
<span id="1109">1109</span>
<span id="1110">1110</span>
<span id="1111">1111</span>
<span id="1112">1112</span>
<span id="1113">1113</span>
<span id="1114">1114</span>
<span id="1115">1115</span>
<span id="1116">1116</span>
<span id="1117">1117</span>
<span id="1118">1118</span>
<span id="1119">1119</span>
<span id="1120">1120</span>
<span id="1121">1121</span>
<span id="1122">1122</span>
<span id="1123">1123</span>
<span id="1124">1124</span>
<span id="1125">1125</span>
<span id="1126">1126</span>
<span id="1127">1127</span>
<span id="1128">1128</span>
<span id="1129">1129</span>
<span id="1130">1130</span>
<span id="1131">1131</span>
<span id="1132">1132</span>
<span id="1133">1133</span>
<span id="1134">1134</span>
<span id="1135">1135</span>
<span id="1136">1136</span>
<span id="1137">1137</span>
<span id="1138">1138</span>
<span id="1139">1139</span>
<span id="1140">1140</span>
<span id="1141">1141</span>
<span id="1142">1142</span>
<span id="1143">1143</span>
<span id="1144">1144</span>
<span id="1145">1145</span>
<span id="1146">1146</span>
<span id="1147">1147</span>
<span id="1148">1148</span>
<span id="1149">1149</span>
<span id="1150">1150</span>
<span id="1151">1151</span>
<span id="1152">1152</span>
<span id="1153">1153</span>
<span id="1154">1154</span>
<span id="1155">1155</span>
<span id="1156">1156</span>
<span id="1157">1157</span>
<span id="1158">1158</span>
<span id="1159">1159</span>
<span id="1160">1160</span>
<span id="1161">1161</span>
<span id="1162">1162</span>
<span id="1163">1163</span>
<span id="1164">1164</span>
<span id="1165">1165</span>
<span id="1166">1166</span>
<span id="1167">1167</span>
<span id="1168">1168</span>
<span id="1169">1169</span>
<span id="1170">1170</span>
<span id="1171">1171</span>
<span id="1172">1172</span>
<span id="1173">1173</span>
<span id="1174">1174</span>
<span id="1175">1175</span>
<span id="1176">1176</span>
<span id="1177">1177</span>
<span id="1178">1178</span>
<span id="1179">1179</span>
<span id="1180">1180</span>
<span id="1181">1181</span>
<span id="1182">1182</span>
<span id="1183">1183</span>
<span id="1184">1184</span>
<span id="1185">1185</span>
<span id="1186">1186</span>
<span id="1187">1187</span>
<span id="1188">1188</span>
<span id="1189">1189</span>
<span id="1190">1190</span>
<span id="1191">1191</span>
<span id="1192">1192</span>
<span id="1193">1193</span>
<span id="1194">1194</span>
<span id="1195">1195</span>
<span id="1196">1196</span>
<span id="1197">1197</span>
<span id="1198">1198</span>
<span id="1199">1199</span>
<span id="1200">1200</span>
<span id="1201">1201</span>
<span id="1202">1202</span>
<span id="1203">1203</span>
<span id="1204">1204</span>
<span id="1205">1205</span>
<span id="1206">1206</span>
<span id="1207">1207</span>
<span id="1208">1208</span>
<span id="1209">1209</span>
<span id="1210">1210</span>
<span id="1211">1211</span>
<span id="1212">1212</span>
<span id="1213">1213</span>
<span id="1214">1214</span>
<span id="1215">1215</span>
<span id="1216">1216</span>
<span id="1217">1217</span>
<span id="1218">1218</span>
<span id="1219">1219</span>
<span id="1220">1220</span>
<span id="1221">1221</span>
<span id="1222">1222</span>
<span id="1223">1223</span>
<span id="1224">1224</span>
<span id="1225">1225</span>
<span id="1226">1226</span>
<span id="1227">1227</span>
<span id="1228">1228</span>
<span id="1229">1229</span>
<span id="1230">1230</span>
<span id="1231">1231</span>
<span id="1232">1232</span>
<span id="1233">1233</span>
<span id="1234">1234</span>
<span id="1235">1235</span>
<span id="1236">1236</span>
<span id="1237">1237</span>
<span id="1238">1238</span>
<span id="1239">1239</span>
<span id="1240">1240</span>
<span id="1241">1241</span>
<span id="1242">1242</span>
<span id="1243">1243</span>
<span id="1244">1244</span>
<span id="1245">1245</span>
<span id="1246">1246</span>
<span id="1247">1247</span>
<span id="1248">1248</span>
<span id="1249">1249</span>
<span id="1250">1250</span>
<span id="1251">1251</span>
<span id="1252">1252</span>
<span id="1253">1253</span>
<span id="1254">1254</span>
<span id="1255">1255</span>
<span id="1256">1256</span>
<span id="1257">1257</span>
<span id="1258">1258</span>
<span id="1259">1259</span>
<span id="1260">1260</span>
<span id="1261">1261</span>
<span id="1262">1262</span>
<span id="1263">1263</span>
<span id="1264">1264</span>
<span id="1265">1265</span>
<span id="1266">1266</span>
<span id="1267">1267</span>
<span id="1268">1268</span>
<span id="1269">1269</span>
<span id="1270">1270</span>
<span id="1271">1271</span>
<span id="1272">1272</span>
<span id="1273">1273</span>
<span id="1274">1274</span>
<span id="1275">1275</span>
<span id="1276">1276</span>
<span id="1277">1277</span>
<span id="1278">1278</span>
<span id="1279">1279</span>
<span id="1280">1280</span>
<span id="1281">1281</span>
<span id="1282">1282</span>
<span id="1283">1283</span>
<span id="1284">1284</span>
<span id="1285">1285</span>
<span id="1286">1286</span>
<span id="1287">1287</span>
<span id="1288">1288</span>
<span id="1289">1289</span>
<span id="1290">1290</span>
<span id="1291">1291</span>
<span id="1292">1292</span>
<span id="1293">1293</span>
<span id="1294">1294</span>
<span id="1295">1295</span>
<span id="1296">1296</span>
<span id="1297">1297</span>
<span id="1298">1298</span>
<span id="1299">1299</span>
<span id="1300">1300</span>
<span id="1301">1301</span>
<span id="1302">1302</span>
<span id="1303">1303</span>
<span id="1304">1304</span>
<span id="1305">1305</span>
<span id="1306">1306</span>
<span id="1307">1307</span>
<span id="1308">1308</span>
<span id="1309">1309</span>
<span id="1310">1310</span>
<span id="1311">1311</span>
<span id="1312">1312</span>
<span id="1313">1313</span>
<span id="1314">1314</span>
<span id="1315">1315</span>
<span id="1316">1316</span>
<span id="1317">1317</span>
<span id="1318">1318</span>
<span id="1319">1319</span>
<span id="1320">1320</span>
<span id="1321">1321</span>
<span id="1322">1322</span>
<span id="1323">1323</span>
<span id="1324">1324</span>
<span id="1325">1325</span>
<span id="1326">1326</span>
<span id="1327">1327</span>
<span id="1328">1328</span>
<span id="1329">1329</span>
<span id="1330">1330</span>
<span id="1331">1331</span>
<span id="1332">1332</span>
<span id="1333">1333</span>
<span id="1334">1334</span>
<span id="1335">1335</span>
<span id="1336">1336</span>
<span id="1337">1337</span>
<span id="1338">1338</span>
<span id="1339">1339</span>
<span id="1340">1340</span>
<span id="1341">1341</span>
<span id="1342">1342</span>
<span id="1343">1343</span>
<span id="1344">1344</span>
<span id="1345">1345</span>
<span id="1346">1346</span>
<span id="1347">1347</span>
<span id="1348">1348</span>
<span id="1349">1349</span>
<span id="1350">1350</span>
<span id="1351">1351</span>
<span id="1352">1352</span>
<span id="1353">1353</span>
<span id="1354">1354</span>
<span id="1355">1355</span>
<span id="1356">1356</span>
<span id="1357">1357</span>
<span id="1358">1358</span>
<span id="1359">1359</span>
<span id="1360">1360</span>
<span id="1361">1361</span>
<span id="1362">1362</span>
<span id="1363">1363</span>
<span id="1364">1364</span>
<span id="1365">1365</span>
<span id="1366">1366</span>
<span id="1367">1367</span>
<span id="1368">1368</span>
<span id="1369">1369</span>
<span id="1370">1370</span>
<span id="1371">1371</span>
<span id="1372">1372</span>
<span id="1373">1373</span>
<span id="1374">1374</span>
<span id="1375">1375</span>
<span id="1376">1376</span>
<span id="1377">1377</span>
<span id="1378">1378</span>
<span id="1379">1379</span>
<span id="1380">1380</span>
<span id="1381">1381</span>
<span id="1382">1382</span>
<span id="1383">1383</span>
<span id="1384">1384</span>
<span id="1385">1385</span>
<span id="1386">1386</span>
<span id="1387">1387</span>
<span id="1388">1388</span>
<span id="1389">1389</span>
<span id="1390">1390</span>
<span id="1391">1391</span>
<span id="1392">1392</span>
<span id="1393">1393</span>
<span id="1394">1394</span>
<span id="1395">1395</span>
<span id="1396">1396</span>
<span id="1397">1397</span>
<span id="1398">1398</span>
<span id="1399">1399</span>
<span id="1400">1400</span>
<span id="1401">1401</span>
<span id="1402">1402</span>
<span id="1403">1403</span>
<span id="1404">1404</span>
<span id="1405">1405</span>
<span id="1406">1406</span>
<span id="1407">1407</span>
<span id="1408">1408</span>
<span id="1409">1409</span>
<span id="1410">1410</span>
<span id="1411">1411</span>
<span id="1412">1412</span>
<span id="1413">1413</span>
<span id="1414">1414</span>
<span id="1415">1415</span>
<span id="1416">1416</span>
<span id="1417">1417</span>
<span id="1418">1418</span>
<span id="1419">1419</span>
<span id="1420">1420</span>
<span id="1421">1421</span>
<span id="1422">1422</span>
<span id="1423">1423</span>
<span id="1424">1424</span>
<span id="1425">1425</span>
<span id="1426">1426</span>
<span id="1427">1427</span>
<span id="1428">1428</span>
<span id="1429">1429</span>
<span id="1430">1430</span>
<span id="1431">1431</span>
<span id="1432">1432</span>
<span id="1433">1433</span>
<span id="1434">1434</span>
<span id="1435">1435</span>
<span id="1436">1436</span>
<span id="1437">1437</span>
<span id="1438">1438</span>
<span id="1439">1439</span>
<span id="1440">1440</span>
<span id="1441">1441</span>
<span id="1442">1442</span>
<span id="1443">1443</span>
<span id="1444">1444</span>
<span id="1445">1445</span>
<span id="1446">1446</span>
<span id="1447">1447</span>
<span id="1448">1448</span>
<span id="1449">1449</span>
<span id="1450">1450</span>
<span id="1451">1451</span>
<span id="1452">1452</span>
<span id="1453">1453</span>
<span id="1454">1454</span>
<span id="1455">1455</span>
<span id="1456">1456</span>
<span id="1457">1457</span>
<span id="1458">1458</span>
<span id="1459">1459</span>
<span id="1460">1460</span>
<span id="1461">1461</span>
<span id="1462">1462</span>
<span id="1463">1463</span>
<span id="1464">1464</span>
<span id="1465">1465</span>
<span id="1466">1466</span>
<span id="1467">1467</span>
<span id="1468">1468</span>
<span id="1469">1469</span>
<span id="1470">1470</span>
<span id="1471">1471</span>
<span id="1472">1472</span>
<span id="1473">1473</span>
<span id="1474">1474</span>
<span id="1475">1475</span>
<span id="1476">1476</span>
<span id="1477">1477</span>
<span id="1478">1478</span>
<span id="1479">1479</span>
<span id="1480">1480</span>
<span id="1481">1481</span>
<span id="1482">1482</span>
<span id="1483">1483</span>
<span id="1484">1484</span>
<span id="1485">1485</span>
<span id="1486">1486</span>
<span id="1487">1487</span>
<span id="1488">1488</span>
<span id="1489">1489</span>
<span id="1490">1490</span>
<span id="1491">1491</span>
<span id="1492">1492</span>
<span id="1493">1493</span>
<span id="1494">1494</span>
<span id="1495">1495</span>
<span id="1496">1496</span>
<span id="1497">1497</span>
<span id="1498">1498</span>
<span id="1499">1499</span>
<span id="1500">1500</span>
<span id="1501">1501</span>
<span id="1502">1502</span>
<span id="1503">1503</span>
<span id="1504">1504</span>
<span id="1505">1505</span>
<span id="1506">1506</span>
<span id="1507">1507</span>
<span id="1508">1508</span>
<span id="1509">1509</span>
<span id="1510">1510</span>
<span id="1511">1511</span>
<span id="1512">1512</span>
<span id="1513">1513</span>
<span id="1514">1514</span>
<span id="1515">1515</span>
<span id="1516">1516</span>
<span id="1517">1517</span>
<span id="1518">1518</span>
<span id="1519">1519</span>
<span id="1520">1520</span>
<span id="1521">1521</span>
<span id="1522">1522</span>
<span id="1523">1523</span>
<span id="1524">1524</span>
<span id="1525">1525</span>
<span id="1526">1526</span>
<span id="1527">1527</span>
<span id="1528">1528</span>
<span id="1529">1529</span>
<span id="1530">1530</span>
<span id="1531">1531</span>
<span id="1532">1532</span>
<span id="1533">1533</span>
<span id="1534">1534</span>
<span id="1535">1535</span>
<span id="1536">1536</span>
<span id="1537">1537</span>
<span id="1538">1538</span>
<span id="1539">1539</span>
<span id="1540">1540</span>
<span id="1541">1541</span>
<span id="1542">1542</span>
<span id="1543">1543</span>
<span id="1544">1544</span>
<span id="1545">1545</span>
<span id="1546">1546</span>
<span id="1547">1547</span>
<span id="1548">1548</span>
<span id="1549">1549</span>
<span id="1550">1550</span>
<span id="1551">1551</span>
<span id="1552">1552</span>
<span id="1553">1553</span>
<span id="1554">1554</span>
<span id="1555">1555</span>
<span id="1556">1556</span>
<span id="1557">1557</span>
<span id="1558">1558</span>
<span id="1559">1559</span>
<span id="1560">1560</span>
<span id="1561">1561</span>
<span id="1562">1562</span>
<span id="1563">1563</span>
<span id="1564">1564</span>
<span id="1565">1565</span>
<span id="1566">1566</span>
<span id="1567">1567</span>
<span id="1568">1568</span>
<span id="1569">1569</span>
<span id="1570">1570</span>
<span id="1571">1571</span>
<span id="1572">1572</span>
<span id="1573">1573</span>
<span id="1574">1574</span>
<span id="1575">1575</span>
<span id="1576">1576</span>
<span id="1577">1577</span>
<span id="1578">1578</span>
<span id="1579">1579</span>
<span id="1580">1580</span>
<span id="1581">1581</span>
<span id="1582">1582</span>
<span id="1583">1583</span>
<span id="1584">1584</span>
<span id="1585">1585</span>
<span id="1586">1586</span>
<span id="1587">1587</span>
<span id="1588">1588</span>
<span id="1589">1589</span>
<span id="1590">1590</span>
<span id="1591">1591</span>
<span id="1592">1592</span>
<span id="1593">1593</span>
<span id="1594">1594</span>
<span id="1595">1595</span>
<span id="1596">1596</span>
<span id="1597">1597</span>
<span id="1598">1598</span>
<span id="1599">1599</span>
<span id="1600">1600</span>
<span id="1601">1601</span>
<span id="1602">1602</span>
<span id="1603">1603</span>
<span id="1604">1604</span>
<span id="1605">1605</span>
<span id="1606">1606</span>
<span id="1607">1607</span>
<span id="1608">1608</span>
<span id="1609">1609</span>
<span id="1610">1610</span>
<span id="1611">1611</span>
<span id="1612">1612</span>
<span id="1613">1613</span>
<span id="1614">1614</span>
<span id="1615">1615</span>
<span id="1616">1616</span>
<span id="1617">1617</span>
<span id="1618">1618</span>
<span id="1619">1619</span>
<span id="1620">1620</span>
<span id="1621">1621</span>
<span id="1622">1622</span>
<span id="1623">1623</span>
<span id="1624">1624</span>
<span id="1625">1625</span>
<span id="1626">1626</span>
<span id="1627">1627</span>
<span id="1628">1628</span>
<span id="1629">1629</span>
<span id="1630">1630</span>
<span id="1631">1631</span>
<span id="1632">1632</span>
<span id="1633">1633</span>
<span id="1634">1634</span>
<span id="1635">1635</span>
<span id="1636">1636</span>
<span id="1637">1637</span>
<span id="1638">1638</span>
<span id="1639">1639</span>
<span id="1640">1640</span>
<span id="1641">1641</span>
<span id="1642">1642</span>
<span id="1643">1643</span>
<span id="1644">1644</span>
<span id="1645">1645</span>
<span id="1646">1646</span>
<span id="1647">1647</span>
<span id="1648">1648</span>
<span id="1649">1649</span>
<span id="1650">1650</span>
<span id="1651">1651</span>
<span id="1652">1652</span>
<span id="1653">1653</span>
<span id="1654">1654</span>
<span id="1655">1655</span>
<span id="1656">1656</span>
<span id="1657">1657</span>
<span id="1658">1658</span>
<span id="1659">1659</span>
<span id="1660">1660</span>
<span id="1661">1661</span>
<span id="1662">1662</span>
<span id="1663">1663</span>
<span id="1664">1664</span>
<span id="1665">1665</span>
<span id="1666">1666</span>
<span id="1667">1667</span>
<span id="1668">1668</span>
<span id="1669">1669</span>
<span id="1670">1670</span>
<span id="1671">1671</span>
<span id="1672">1672</span>
<span id="1673">1673</span>
<span id="1674">1674</span>
<span id="1675">1675</span>
<span id="1676">1676</span>
<span id="1677">1677</span>
<span id="1678">1678</span>
<span id="1679">1679</span>
<span id="1680">1680</span>
<span id="1681">1681</span>
<span id="1682">1682</span>
<span id="1683">1683</span>
<span id="1684">1684</span>
<span id="1685">1685</span>
<span id="1686">1686</span>
<span id="1687">1687</span>
<span id="1688">1688</span>
<span id="1689">1689</span>
<span id="1690">1690</span>
<span id="1691">1691</span>
<span id="1692">1692</span>
<span id="1693">1693</span>
<span id="1694">1694</span>
<span id="1695">1695</span>
<span id="1696">1696</span>
<span id="1697">1697</span>
<span id="1698">1698</span>
<span id="1699">1699</span>
<span id="1700">1700</span>
<span id="1701">1701</span>
<span id="1702">1702</span>
<span id="1703">1703</span>
<span id="1704">1704</span>
<span id="1705">1705</span>
<span id="1706">1706</span>
<span id="1707">1707</span>
<span id="1708">1708</span>
<span id="1709">1709</span>
<span id="1710">1710</span>
<span id="1711">1711</span>
<span id="1712">1712</span>
<span id="1713">1713</span>
<span id="1714">1714</span>
<span id="1715">1715</span>
<span id="1716">1716</span>
<span id="1717">1717</span>
<span id="1718">1718</span>
<span id="1719">1719</span>
<span id="1720">1720</span>
<span id="1721">1721</span>
<span id="1722">1722</span>
<span id="1723">1723</span>
<span id="1724">1724</span>
<span id="1725">1725</span>
<span id="1726">1726</span>
<span id="1727">1727</span>
<span id="1728">1728</span>
<span id="1729">1729</span>
<span id="1730">1730</span>
<span id="1731">1731</span>
<span id="1732">1732</span>
<span id="1733">1733</span>
<span id="1734">1734</span>
<span id="1735">1735</span>
<span id="1736">1736</span>
<span id="1737">1737</span>
<span id="1738">1738</span>
<span id="1739">1739</span>
<span id="1740">1740</span>
<span id="1741">1741</span>
<span id="1742">1742</span>
<span id="1743">1743</span>
<span id="1744">1744</span>
<span id="1745">1745</span>
<span id="1746">1746</span>
<span id="1747">1747</span>
<span id="1748">1748</span>
<span id="1749">1749</span>
<span id="1750">1750</span>
<span id="1751">1751</span>
<span id="1752">1752</span>
<span id="1753">1753</span>
<span id="1754">1754</span>
<span id="1755">1755</span>
<span id="1756">1756</span>
<span id="1757">1757</span>
<span id="1758">1758</span>
<span id="1759">1759</span>
<span id="1760">1760</span>
<span id="1761">1761</span>
<span id="1762">1762</span>
<span id="1763">1763</span>
<span id="1764">1764</span>
<span id="1765">1765</span>
<span id="1766">1766</span>
<span id="1767">1767</span>
<span id="1768">1768</span>
<span id="1769">1769</span>
<span id="1770">1770</span>
<span id="1771">1771</span>
<span id="1772">1772</span>
<span id="1773">1773</span>
<span id="1774">1774</span>
<span id="1775">1775</span>
<span id="1776">1776</span>
<span id="1777">1777</span>
<span id="1778">1778</span>
<span id="1779">1779</span>
<span id="1780">1780</span>
<span id="1781">1781</span>
<span id="1782">1782</span>
<span id="1783">1783</span>
<span id="1784">1784</span>
<span id="1785">1785</span>
<span id="1786">1786</span>
<span id="1787">1787</span>
<span id="1788">1788</span>
<span id="1789">1789</span>
<span id="1790">1790</span>
<span id="1791">1791</span>
<span id="1792">1792</span>
<span id="1793">1793</span>
<span id="1794">1794</span>
<span id="1795">1795</span>
<span id="1796">1796</span>
<span id="1797">1797</span>
<span id="1798">1798</span>
<span id="1799">1799</span>
<span id="1800">1800</span>
<span id="1801">1801</span>
<span id="1802">1802</span>
<span id="1803">1803</span>
<span id="1804">1804</span>
<span id="1805">1805</span>
<span id="1806">1806</span>
<span id="1807">1807</span>
<span id="1808">1808</span>
<span id="1809">1809</span>
<span id="1810">1810</span>
<span id="1811">1811</span>
<span id="1812">1812</span>
<span id="1813">1813</span>
<span id="1814">1814</span>
<span id="1815">1815</span>
<span id="1816">1816</span>
<span id="1817">1817</span>
<span id="1818">1818</span>
<span id="1819">1819</span>
<span id="1820">1820</span>
<span id="1821">1821</span>
<span id="1822">1822</span>
<span id="1823">1823</span>
<span id="1824">1824</span>
<span id="1825">1825</span>
<span id="1826">1826</span>
<span id="1827">1827</span>
<span id="1828">1828</span>
<span id="1829">1829</span>
<span id="1830">1830</span>
<span id="1831">1831</span>
<span id="1832">1832</span>
<span id="1833">1833</span>
<span id="1834">1834</span>
<span id="1835">1835</span>
<span id="1836">1836</span>
<span id="1837">1837</span>
<span id="1838">1838</span>
<span id="1839">1839</span>
<span id="1840">1840</span>
<span id="1841">1841</span>
<span id="1842">1842</span>
<span id="1843">1843</span>
<span id="1844">1844</span>
<span id="1845">1845</span>
<span id="1846">1846</span>
<span id="1847">1847</span>
<span id="1848">1848</span>
<span id="1849">1849</span>
<span id="1850">1850</span>
<span id="1851">1851</span>
<span id="1852">1852</span>
<span id="1853">1853</span>
<span id="1854">1854</span>
<span id="1855">1855</span>
<span id="1856">1856</span>
<span id="1857">1857</span>
<span id="1858">1858</span>
<span id="1859">1859</span>
<span id="1860">1860</span>
<span id="1861">1861</span>
<span id="1862">1862</span>
<span id="1863">1863</span>
<span id="1864">1864</span>
<span id="1865">1865</span>
<span id="1866">1866</span>
<span id="1867">1867</span>
<span id="1868">1868</span>
<span id="1869">1869</span>
<span id="1870">1870</span>
<span id="1871">1871</span>
<span id="1872">1872</span>
<span id="1873">1873</span>
<span id="1874">1874</span>
<span id="1875">1875</span>
<span id="1876">1876</span>
<span id="1877">1877</span>
<span id="1878">1878</span>
<span id="1879">1879</span>
<span id="1880">1880</span>
<span id="1881">1881</span>
<span id="1882">1882</span>
<span id="1883">1883</span>
<span id="1884">1884</span>
<span id="1885">1885</span>
<span id="1886">1886</span>
<span id="1887">1887</span>
<span id="1888">1888</span>
<span id="1889">1889</span>
<span id="1890">1890</span>
<span id="1891">1891</span>
<span id="1892">1892</span>
<span id="1893">1893</span>
<span id="1894">1894</span>
<span id="1895">1895</span>
<span id="1896">1896</span>
<span id="1897">1897</span>
<span id="1898">1898</span>
<span id="1899">1899</span>
<span id="1900">1900</span>
<span id="1901">1901</span>
<span id="1902">1902</span>
<span id="1903">1903</span>
<span id="1904">1904</span>
<span id="1905">1905</span>
<span id="1906">1906</span>
<span id="1907">1907</span>
<span id="1908">1908</span>
<span id="1909">1909</span>
<span id="1910">1910</span>
<span id="1911">1911</span>
<span id="1912">1912</span>
<span id="1913">1913</span>
<span id="1914">1914</span>
<span id="1915">1915</span>
<span id="1916">1916</span>
<span id="1917">1917</span>
<span id="1918">1918</span>
<span id="1919">1919</span>
<span id="1920">1920</span>
<span id="1921">1921</span>
<span id="1922">1922</span>
<span id="1923">1923</span>
<span id="1924">1924</span>
<span id="1925">1925</span>
<span id="1926">1926</span>
<span id="1927">1927</span>
<span id="1928">1928</span>
<span id="1929">1929</span>
<span id="1930">1930</span>
<span id="1931">1931</span>
<span id="1932">1932</span>
<span id="1933">1933</span>
<span id="1934">1934</span>
<span id="1935">1935</span>
<span id="1936">1936</span>
<span id="1937">1937</span>
<span id="1938">1938</span>
<span id="1939">1939</span>
<span id="1940">1940</span>
<span id="1941">1941</span>
<span id="1942">1942</span>
<span id="1943">1943</span>
<span id="1944">1944</span>
<span id="1945">1945</span>
<span id="1946">1946</span>
<span id="1947">1947</span>
<span id="1948">1948</span>
<span id="1949">1949</span>
<span id="1950">1950</span>
<span id="1951">1951</span>
<span id="1952">1952</span>
<span id="1953">1953</span>
<span id="1954">1954</span>
<span id="1955">1955</span>
<span id="1956">1956</span>
<span id="1957">1957</span>
<span id="1958">1958</span>
<span id="1959">1959</span>
<span id="1960">1960</span>
<span id="1961">1961</span>
<span id="1962">1962</span>
<span id="1963">1963</span>
<span id="1964">1964</span>
<span id="1965">1965</span>
<span id="1966">1966</span>
<span id="1967">1967</span>
<span id="1968">1968</span>
<span id="1969">1969</span>
<span id="1970">1970</span>
<span id="1971">1971</span>
<span id="1972">1972</span>
<span id="1973">1973</span>
<span id="1974">1974</span>
<span id="1975">1975</span>
<span id="1976">1976</span>
<span id="1977">1977</span>
<span id="1978">1978</span>
<span id="1979">1979</span>
<span id="1980">1980</span>
<span id="1981">1981</span>
<span id="1982">1982</span>
<span id="1983">1983</span>
<span id="1984">1984</span>
<span id="1985">1985</span>
<span id="1986">1986</span>
<span id="1987">1987</span>
<span id="1988">1988</span>
<span id="1989">1989</span>
<span id="1990">1990</span>
<span id="1991">1991</span>
<span id="1992">1992</span>
<span id="1993">1993</span>
<span id="1994">1994</span>
<span id="1995">1995</span>
<span id="1996">1996</span>
<span id="1997">1997</span>
<span id="1998">1998</span>
<span id="1999">1999</span>
<span id="2000">2000</span>
<span id="2001">2001</span>
<span id="2002">2002</span>
<span id="2003">2003</span>
<span id="2004">2004</span>
<span id="2005">2005</span>
<span id="2006">2006</span>
<span id="2007">2007</span>
<span id="2008">2008</span>
<span id="2009">2009</span>
<span id="2010">2010</span>
<span id="2011">2011</span>
<span id="2012">2012</span>
<span id="2013">2013</span>
<span id="2014">2014</span>
<span id="2015">2015</span>
<span id="2016">2016</span>
<span id="2017">2017</span>
<span id="2018">2018</span>
<span id="2019">2019</span>
<span id="2020">2020</span>
<span id="2021">2021</span>
<span id="2022">2022</span>
<span id="2023">2023</span>
<span id="2024">2024</span>
<span id="2025">2025</span>
<span id="2026">2026</span>
<span id="2027">2027</span>
<span id="2028">2028</span>
<span id="2029">2029</span>
<span id="2030">2030</span>
<span id="2031">2031</span>
<span id="2032">2032</span>
<span id="2033">2033</span>
<span id="2034">2034</span>
<span id="2035">2035</span>
<span id="2036">2036</span>
<span id="2037">2037</span>
<span id="2038">2038</span>
<span id="2039">2039</span>
<span id="2040">2040</span>
<span id="2041">2041</span>
<span id="2042">2042</span>
<span id="2043">2043</span>
<span id="2044">2044</span>
<span id="2045">2045</span>
<span id="2046">2046</span>
<span id="2047">2047</span>
<span id="2048">2048</span>
<span id="2049">2049</span>
<span id="2050">2050</span>
<span id="2051">2051</span>
<span id="2052">2052</span>
<span id="2053">2053</span>
<span id="2054">2054</span>
<span id="2055">2055</span>
<span id="2056">2056</span>
<span id="2057">2057</span>
<span id="2058">2058</span>
<span id="2059">2059</span>
<span id="2060">2060</span>
<span id="2061">2061</span>
<span id="2062">2062</span>
<span id="2063">2063</span>
<span id="2064">2064</span>
<span id="2065">2065</span>
<span id="2066">2066</span>
<span id="2067">2067</span>
<span id="2068">2068</span>
<span id="2069">2069</span>
<span id="2070">2070</span>
<span id="2071">2071</span>
<span id="2072">2072</span>
<span id="2073">2073</span>
<span id="2074">2074</span>
<span id="2075">2075</span>
<span id="2076">2076</span>
<span id="2077">2077</span>
<span id="2078">2078</span>
<span id="2079">2079</span>
<span id="2080">2080</span>
<span id="2081">2081</span>
<span id="2082">2082</span>
<span id="2083">2083</span>
<span id="2084">2084</span>
<span id="2085">2085</span>
<span id="2086">2086</span>
<span id="2087">2087</span>
<span id="2088">2088</span>
<span id="2089">2089</span>
<span id="2090">2090</span>
<span id="2091">2091</span>
<span id="2092">2092</span>
<span id="2093">2093</span>
<span id="2094">2094</span>
<span id="2095">2095</span>
<span id="2096">2096</span>
<span id="2097">2097</span>
<span id="2098">2098</span>
<span id="2099">2099</span>
<span id="2100">2100</span>
<span id="2101">2101</span>
<span id="2102">2102</span>
<span id="2103">2103</span>
<span id="2104">2104</span>
<span id="2105">2105</span>
<span id="2106">2106</span>
<span id="2107">2107</span>
<span id="2108">2108</span>
<span id="2109">2109</span>
<span id="2110">2110</span>
<span id="2111">2111</span>
<span id="2112">2112</span>
<span id="2113">2113</span>
<span id="2114">2114</span>
<span id="2115">2115</span>
<span id="2116">2116</span>
<span id="2117">2117</span>
<span id="2118">2118</span>
<span id="2119">2119</span>
<span id="2120">2120</span>
<span id="2121">2121</span>
<span id="2122">2122</span>
<span id="2123">2123</span>
<span id="2124">2124</span>
<span id="2125">2125</span>
<span id="2126">2126</span>
<span id="2127">2127</span>
<span id="2128">2128</span>
<span id="2129">2129</span>
<span id="2130">2130</span>
<span id="2131">2131</span>
<span id="2132">2132</span>
<span id="2133">2133</span>
<span id="2134">2134</span>
<span id="2135">2135</span>
<span id="2136">2136</span>
<span id="2137">2137</span>
<span id="2138">2138</span>
<span id="2139">2139</span>
<span id="2140">2140</span>
<span id="2141">2141</span>
<span id="2142">2142</span>
<span id="2143">2143</span>
<span id="2144">2144</span>
<span id="2145">2145</span>
<span id="2146">2146</span>
<span id="2147">2147</span>
<span id="2148">2148</span>
<span id="2149">2149</span>
<span id="2150">2150</span>
<span id="2151">2151</span>
<span id="2152">2152</span>
<span id="2153">2153</span>
<span id="2154">2154</span>
<span id="2155">2155</span>
<span id="2156">2156</span>
<span id="2157">2157</span>
<span id="2158">2158</span>
<span id="2159">2159</span>
<span id="2160">2160</span>
<span id="2161">2161</span>
<span id="2162">2162</span>
<span id="2163">2163</span>
<span id="2164">2164</span>
<span id="2165">2165</span>
<span id="2166">2166</span>
<span id="2167">2167</span>
<span id="2168">2168</span>
<span id="2169">2169</span>
<span id="2170">2170</span>
<span id="2171">2171</span>
<span id="2172">2172</span>
<span id="2173">2173</span>
<span id="2174">2174</span>
<span id="2175">2175</span>
<span id="2176">2176</span>
<span id="2177">2177</span>
<span id="2178">2178</span>
<span id="2179">2179</span>
<span id="2180">2180</span>
<span id="2181">2181</span>
<span id="2182">2182</span>
<span id="2183">2183</span>
<span id="2184">2184</span>
<span id="2185">2185</span>
<span id="2186">2186</span>
<span id="2187">2187</span>
<span id="2188">2188</span>
<span id="2189">2189</span>
<span id="2190">2190</span>
<span id="2191">2191</span>
<span id="2192">2192</span>
<span id="2193">2193</span>
<span id="2194">2194</span>
<span id="2195">2195</span>
<span id="2196">2196</span>
<span id="2197">2197</span>
<span id="2198">2198</span>
<span id="2199">2199</span>
<span id="2200">2200</span>
<span id="2201">2201</span>
<span id="2202">2202</span>
<span id="2203">2203</span>
<span id="2204">2204</span>
<span id="2205">2205</span>
<span id="2206">2206</span>
<span id="2207">2207</span>
<span id="2208">2208</span>
<span id="2209">2209</span>
<span id="2210">2210</span>
<span id="2211">2211</span>
<span id="2212">2212</span>
<span id="2213">2213</span>
<span id="2214">2214</span>
<span id="2215">2215</span>
<span id="2216">2216</span>
<span id="2217">2217</span>
<span id="2218">2218</span>
<span id="2219">2219</span>
<span id="2220">2220</span>
<span id="2221">2221</span>
<span id="2222">2222</span>
<span id="2223">2223</span>
<span id="2224">2224</span>
<span id="2225">2225</span>
<span id="2226">2226</span>
<span id="2227">2227</span>
<span id="2228">2228</span>
<span id="2229">2229</span>
<span id="2230">2230</span>
<span id="2231">2231</span>
<span id="2232">2232</span>
<span id="2233">2233</span>
<span id="2234">2234</span>
<span id="2235">2235</span>
<span id="2236">2236</span>
<span id="2237">2237</span>
<span id="2238">2238</span>
<span id="2239">2239</span>
<span id="2240">2240</span>
<span id="2241">2241</span>
<span id="2242">2242</span>
<span id="2243">2243</span>
<span id="2244">2244</span>
<span id="2245">2245</span>
<span id="2246">2246</span>
<span id="2247">2247</span>
<span id="2248">2248</span>
<span id="2249">2249</span>
<span id="2250">2250</span>
<span id="2251">2251</span>
<span id="2252">2252</span>
<span id="2253">2253</span>
<span id="2254">2254</span>
<span id="2255">2255</span>
<span id="2256">2256</span>
<span id="2257">2257</span>
<span id="2258">2258</span>
<span id="2259">2259</span>
<span id="2260">2260</span>
<span id="2261">2261</span>
<span id="2262">2262</span>
<span id="2263">2263</span>
<span id="2264">2264</span>
<span id="2265">2265</span>
<span id="2266">2266</span>
<span id="2267">2267</span>
<span id="2268">2268</span>
<span id="2269">2269</span>
<span id="2270">2270</span>
<span id="2271">2271</span>
<span id="2272">2272</span>
<span id="2273">2273</span>
<span id="2274">2274</span>
<span id="2275">2275</span>
<span id="2276">2276</span>
<span id="2277">2277</span>
<span id="2278">2278</span>
<span id="2279">2279</span>
<span id="2280">2280</span>
<span id="2281">2281</span>
<span id="2282">2282</span>
<span id="2283">2283</span>
<span id="2284">2284</span>
<span id="2285">2285</span>
<span id="2286">2286</span>
<span id="2287">2287</span>
<span id="2288">2288</span>
<span id="2289">2289</span>
<span id="2290">2290</span>
<span id="2291">2291</span>
<span id="2292">2292</span>
<span id="2293">2293</span>
<span id="2294">2294</span>
<span id="2295">2295</span>
<span id="2296">2296</span>
<span id="2297">2297</span>
<span id="2298">2298</span>
<span id="2299">2299</span>
<span id="2300">2300</span>
<span id="2301">2301</span>
<span id="2302">2302</span>
<span id="2303">2303</span>
<span id="2304">2304</span>
<span id="2305">2305</span>
<span id="2306">2306</span>
<span id="2307">2307</span>
<span id="2308">2308</span>
<span id="2309">2309</span>
<span id="2310">2310</span>
<span id="2311">2311</span>
<span id="2312">2312</span>
<span id="2313">2313</span>
<span id="2314">2314</span>
<span id="2315">2315</span>
<span id="2316">2316</span>
<span id="2317">2317</span>
<span id="2318">2318</span>
<span id="2319">2319</span>
<span id="2320">2320</span>
<span id="2321">2321</span>
<span id="2322">2322</span>
<span id="2323">2323</span>
<span id="2324">2324</span>
<span id="2325">2325</span>
<span id="2326">2326</span>
<span id="2327">2327</span>
<span id="2328">2328</span>
<span id="2329">2329</span>
<span id="2330">2330</span>
<span id="2331">2331</span>
<span id="2332">2332</span>
<span id="2333">2333</span>
<span id="2334">2334</span>
<span id="2335">2335</span>
<span id="2336">2336</span>
<span id="2337">2337</span>
<span id="2338">2338</span>
<span id="2339">2339</span>
<span id="2340">2340</span>
<span id="2341">2341</span>
<span id="2342">2342</span>
<span id="2343">2343</span>
<span id="2344">2344</span>
<span id="2345">2345</span>
<span id="2346">2346</span>
<span id="2347">2347</span>
<span id="2348">2348</span>
<span id="2349">2349</span>
<span id="2350">2350</span>
<span id="2351">2351</span>
<span id="2352">2352</span>
<span id="2353">2353</span>
<span id="2354">2354</span>
<span id="2355">2355</span>
<span id="2356">2356</span>
<span id="2357">2357</span>
<span id="2358">2358</span>
<span id="2359">2359</span>
<span id="2360">2360</span>
<span id="2361">2361</span>
<span id="2362">2362</span>
<span id="2363">2363</span>
<span id="2364">2364</span>
<span id="2365">2365</span>
<span id="2366">2366</span>
<span id="2367">2367</span>
<span id="2368">2368</span>
<span id="2369">2369</span>
<span id="2370">2370</span>
<span id="2371">2371</span>
<span id="2372">2372</span>
<span id="2373">2373</span>
<span id="2374">2374</span>
<span id="2375">2375</span>
<span id="2376">2376</span>
<span id="2377">2377</span>
<span id="2378">2378</span>
<span id="2379">2379</span>
<span id="2380">2380</span>
<span id="2381">2381</span>
<span id="2382">2382</span>
<span id="2383">2383</span>
<span id="2384">2384</span>
<span id="2385">2385</span>
<span id="2386">2386</span>
<span id="2387">2387</span>
<span id="2388">2388</span>
<span id="2389">2389</span>
<span id="2390">2390</span>
<span id="2391">2391</span>
<span id="2392">2392</span>
<span id="2393">2393</span>
<span id="2394">2394</span>
<span id="2395">2395</span>
<span id="2396">2396</span>
<span id="2397">2397</span>
<span id="2398">2398</span>
<span id="2399">2399</span>
<span id="2400">2400</span>
<span id="2401">2401</span>
<span id="2402">2402</span>
<span id="2403">2403</span>
<span id="2404">2404</span>
<span id="2405">2405</span>
<span id="2406">2406</span>
<span id="2407">2407</span>
<span id="2408">2408</span>
<span id="2409">2409</span>
<span id="2410">2410</span>
<span id="2411">2411</span>
<span id="2412">2412</span>
<span id="2413">2413</span>
<span id="2414">2414</span>
<span id="2415">2415</span>
<span id="2416">2416</span>
<span id="2417">2417</span>
<span id="2418">2418</span>
<span id="2419">2419</span>
<span id="2420">2420</span>
<span id="2421">2421</span>
<span id="2422">2422</span>
<span id="2423">2423</span>
<span id="2424">2424</span>
<span id="2425">2425</span>
<span id="2426">2426</span>
<span id="2427">2427</span>
<span id="2428">2428</span>
<span id="2429">2429</span>
<span id="2430">2430</span>
<span id="2431">2431</span>
<span id="2432">2432</span>
<span id="2433">2433</span>
<span id="2434">2434</span>
<span id="2435">2435</span>
<span id="2436">2436</span>
<span id="2437">2437</span>
<span id="2438">2438</span>
<span id="2439">2439</span>
<span id="2440">2440</span>
<span id="2441">2441</span>
<span id="2442">2442</span>
<span id="2443">2443</span>
<span id="2444">2444</span>
<span id="2445">2445</span>
<span id="2446">2446</span>
<span id="2447">2447</span>
<span id="2448">2448</span>
<span id="2449">2449</span>
<span id="2450">2450</span>
<span id="2451">2451</span>
<span id="2452">2452</span>
<span id="2453">2453</span>
<span id="2454">2454</span>
<span id="2455">2455</span>
<span id="2456">2456</span>
<span id="2457">2457</span>
<span id="2458">2458</span>
<span id="2459">2459</span>
<span id="2460">2460</span>
<span id="2461">2461</span>
<span id="2462">2462</span>
<span id="2463">2463</span>
<span id="2464">2464</span>
<span id="2465">2465</span>
<span id="2466">2466</span>
<span id="2467">2467</span>
<span id="2468">2468</span>
<span id="2469">2469</span>
<span id="2470">2470</span>
<span id="2471">2471</span>
<span id="2472">2472</span>
<span id="2473">2473</span>
<span id="2474">2474</span>
<span id="2475">2475</span>
<span id="2476">2476</span>
<span id="2477">2477</span>
<span id="2478">2478</span>
<span id="2479">2479</span>
<span id="2480">2480</span>
<span id="2481">2481</span>
<span id="2482">2482</span>
<span id="2483">2483</span>
<span id="2484">2484</span>
<span id="2485">2485</span>
<span id="2486">2486</span>
<span id="2487">2487</span>
<span id="2488">2488</span>
<span id="2489">2489</span>
<span id="2490">2490</span>
<span id="2491">2491</span>
<span id="2492">2492</span>
<span id="2493">2493</span>
<span id="2494">2494</span>
<span id="2495">2495</span>
<span id="2496">2496</span>
<span id="2497">2497</span>
<span id="2498">2498</span>
<span id="2499">2499</span>
<span id="2500">2500</span>
<span id="2501">2501</span>
<span id="2502">2502</span>
<span id="2503">2503</span>
<span id="2504">2504</span>
<span id="2505">2505</span>
<span id="2506">2506</span>
<span id="2507">2507</span>
<span id="2508">2508</span>
<span id="2509">2509</span>
<span id="2510">2510</span>
<span id="2511">2511</span>
<span id="2512">2512</span>
<span id="2513">2513</span>
<span id="2514">2514</span>
<span id="2515">2515</span>
<span id="2516">2516</span>
<span id="2517">2517</span>
<span id="2518">2518</span>
<span id="2519">2519</span>
<span id="2520">2520</span>
<span id="2521">2521</span>
<span id="2522">2522</span>
<span id="2523">2523</span>
<span id="2524">2524</span>
<span id="2525">2525</span>
<span id="2526">2526</span>
<span id="2527">2527</span>
<span id="2528">2528</span>
<span id="2529">2529</span>
<span id="2530">2530</span>
<span id="2531">2531</span>
<span id="2532">2532</span>
<span id="2533">2533</span>
<span id="2534">2534</span>
<span id="2535">2535</span>
<span id="2536">2536</span>
<span id="2537">2537</span>
<span id="2538">2538</span>
<span id="2539">2539</span>
<span id="2540">2540</span>
<span id="2541">2541</span>
<span id="2542">2542</span>
<span id="2543">2543</span>
<span id="2544">2544</span>
<span id="2545">2545</span>
<span id="2546">2546</span>
<span id="2547">2547</span>
<span id="2548">2548</span>
<span id="2549">2549</span>
<span id="2550">2550</span>
<span id="2551">2551</span>
<span id="2552">2552</span>
<span id="2553">2553</span>
<span id="2554">2554</span>
<span id="2555">2555</span>
<span id="2556">2556</span>
<span id="2557">2557</span>
<span id="2558">2558</span>
<span id="2559">2559</span>
<span id="2560">2560</span>
<span id="2561">2561</span>
<span id="2562">2562</span>
<span id="2563">2563</span>
<span id="2564">2564</span>
<span id="2565">2565</span>
<span id="2566">2566</span>
<span id="2567">2567</span>
<span id="2568">2568</span>
<span id="2569">2569</span>
<span id="2570">2570</span>
<span id="2571">2571</span>
<span id="2572">2572</span>
<span id="2573">2573</span>
<span id="2574">2574</span>
<span id="2575">2575</span>
<span id="2576">2576</span>
<span id="2577">2577</span>
<span id="2578">2578</span>
<span id="2579">2579</span>
<span id="2580">2580</span>
<span id="2581">2581</span>
<span id="2582">2582</span>
<span id="2583">2583</span>
<span id="2584">2584</span>
<span id="2585">2585</span>
<span id="2586">2586</span>
<span id="2587">2587</span>
<span id="2588">2588</span>
<span id="2589">2589</span>
<span id="2590">2590</span>
<span id="2591">2591</span>
<span id="2592">2592</span>
<span id="2593">2593</span>
<span id="2594">2594</span>
<span id="2595">2595</span>
<span id="2596">2596</span>
<span id="2597">2597</span>
<span id="2598">2598</span>
<span id="2599">2599</span>
<span id="2600">2600</span>
<span id="2601">2601</span>
<span id="2602">2602</span>
<span id="2603">2603</span>
<span id="2604">2604</span>
<span id="2605">2605</span>
<span id="2606">2606</span>
<span id="2607">2607</span>
<span id="2608">2608</span>
<span id="2609">2609</span>
<span id="2610">2610</span>
<span id="2611">2611</span>
<span id="2612">2612</span>
<span id="2613">2613</span>
<span id="2614">2614</span>
<span id="2615">2615</span>
<span id="2616">2616</span>
<span id="2617">2617</span>
<span id="2618">2618</span>
<span id="2619">2619</span>
<span id="2620">2620</span>
<span id="2621">2621</span>
<span id="2622">2622</span>
<span id="2623">2623</span>
<span id="2624">2624</span>
<span id="2625">2625</span>
<span id="2626">2626</span>
<span id="2627">2627</span>
<span id="2628">2628</span>
<span id="2629">2629</span>
<span id="2630">2630</span>
<span id="2631">2631</span>
<span id="2632">2632</span>
<span id="2633">2633</span>
<span id="2634">2634</span>
<span id="2635">2635</span>
<span id="2636">2636</span>
<span id="2637">2637</span>
<span id="2638">2638</span>
<span id="2639">2639</span>
<span id="2640">2640</span>
<span id="2641">2641</span>
<span id="2642">2642</span>
<span id="2643">2643</span>
<span id="2644">2644</span>
<span id="2645">2645</span>
<span id="2646">2646</span>
<span id="2647">2647</span>
<span id="2648">2648</span>
<span id="2649">2649</span>
<span id="2650">2650</span>
<span id="2651">2651</span>
<span id="2652">2652</span>
<span id="2653">2653</span>
<span id="2654">2654</span>
<span id="2655">2655</span>
<span id="2656">2656</span>
<span id="2657">2657</span>
<span id="2658">2658</span>
<span id="2659">2659</span>
<span id="2660">2660</span>
<span id="2661">2661</span>
<span id="2662">2662</span>
<span id="2663">2663</span>
<span id="2664">2664</span>
<span id="2665">2665</span>
<span id="2666">2666</span>
<span id="2667">2667</span>
<span id="2668">2668</span>
<span id="2669">2669</span>
<span id="2670">2670</span>
<span id="2671">2671</span>
<span id="2672">2672</span>
<span id="2673">2673</span>
<span id="2674">2674</span>
<span id="2675">2675</span>
<span id="2676">2676</span>
<span id="2677">2677</span>
<span id="2678">2678</span>
<span id="2679">2679</span>
<span id="2680">2680</span>
<span id="2681">2681</span>
<span id="2682">2682</span>
<span id="2683">2683</span>
<span id="2684">2684</span>
<span id="2685">2685</span>
<span id="2686">2686</span>
<span id="2687">2687</span>
<span id="2688">2688</span>
<span id="2689">2689</span>
<span id="2690">2690</span>
<span id="2691">2691</span>
<span id="2692">2692</span>
<span id="2693">2693</span>
<span id="2694">2694</span>
<span id="2695">2695</span>
<span id="2696">2696</span>
<span id="2697">2697</span>
<span id="2698">2698</span>
<span id="2699">2699</span>
<span id="2700">2700</span>
<span id="2701">2701</span>
<span id="2702">2702</span>
<span id="2703">2703</span>
<span id="2704">2704</span>
<span id="2705">2705</span>
<span id="2706">2706</span>
<span id="2707">2707</span>
<span id="2708">2708</span>
<span id="2709">2709</span>
<span id="2710">2710</span>
<span id="2711">2711</span>
<span id="2712">2712</span>
<span id="2713">2713</span>
<span id="2714">2714</span>
<span id="2715">2715</span>
<span id="2716">2716</span>
<span id="2717">2717</span>
<span id="2718">2718</span>
<span id="2719">2719</span>
<span id="2720">2720</span>
<span id="2721">2721</span>
<span id="2722">2722</span>
<span id="2723">2723</span>
<span id="2724">2724</span>
<span id="2725">2725</span>
<span id="2726">2726</span>
<span id="2727">2727</span>
<span id="2728">2728</span>
<span id="2729">2729</span>
<span id="2730">2730</span>
<span id="2731">2731</span>
<span id="2732">2732</span>
<span id="2733">2733</span>
<span id="2734">2734</span>
<span id="2735">2735</span>
<span id="2736">2736</span>
<span id="2737">2737</span>
<span id="2738">2738</span>
<span id="2739">2739</span>
<span id="2740">2740</span>
<span id="2741">2741</span>
<span id="2742">2742</span>
<span id="2743">2743</span>
<span id="2744">2744</span>
<span id="2745">2745</span>
<span id="2746">2746</span>
<span id="2747">2747</span>
<span id="2748">2748</span>
<span id="2749">2749</span>
<span id="2750">2750</span>
<span id="2751">2751</span>
<span id="2752">2752</span>
<span id="2753">2753</span>
<span id="2754">2754</span>
<span id="2755">2755</span>
<span id="2756">2756</span>
<span id="2757">2757</span>
<span id="2758">2758</span>
<span id="2759">2759</span>
<span id="2760">2760</span>
<span id="2761">2761</span>
<span id="2762">2762</span>
<span id="2763">2763</span>
<span id="2764">2764</span>
<span id="2765">2765</span>
<span id="2766">2766</span>
<span id="2767">2767</span>
<span id="2768">2768</span>
<span id="2769">2769</span>
<span id="2770">2770</span>
<span id="2771">2771</span>
<span id="2772">2772</span>
<span id="2773">2773</span>
<span id="2774">2774</span>
<span id="2775">2775</span>
<span id="2776">2776</span>
<span id="2777">2777</span>
<span id="2778">2778</span>
<span id="2779">2779</span>
<span id="2780">2780</span>
<span id="2781">2781</span>
<span id="2782">2782</span>
<span id="2783">2783</span>
<span id="2784">2784</span>
<span id="2785">2785</span>
<span id="2786">2786</span>
<span id="2787">2787</span>
<span id="2788">2788</span>
<span id="2789">2789</span>
<span id="2790">2790</span>
<span id="2791">2791</span>
<span id="2792">2792</span>
<span id="2793">2793</span>
<span id="2794">2794</span>
<span id="2795">2795</span>
<span id="2796">2796</span>
<span id="2797">2797</span>
<span id="2798">2798</span>
<span id="2799">2799</span>
<span id="2800">2800</span>
<span id="2801">2801</span>
<span id="2802">2802</span>
<span id="2803">2803</span>
<span id="2804">2804</span>
<span id="2805">2805</span>
<span id="2806">2806</span>
<span id="2807">2807</span>
<span id="2808">2808</span>
<span id="2809">2809</span>
<span id="2810">2810</span>
<span id="2811">2811</span>
<span id="2812">2812</span>
<span id="2813">2813</span>
<span id="2814">2814</span>
<span id="2815">2815</span>
<span id="2816">2816</span>
<span id="2817">2817</span>
<span id="2818">2818</span>
<span id="2819">2819</span>
<span id="2820">2820</span>
<span id="2821">2821</span>
<span id="2822">2822</span>
<span id="2823">2823</span>
<span id="2824">2824</span>
<span id="2825">2825</span>
<span id="2826">2826</span>
<span id="2827">2827</span>
<span id="2828">2828</span>
<span id="2829">2829</span>
<span id="2830">2830</span>
<span id="2831">2831</span>
<span id="2832">2832</span>
<span id="2833">2833</span>
<span id="2834">2834</span>
<span id="2835">2835</span>
<span id="2836">2836</span>
<span id="2837">2837</span>
<span id="2838">2838</span>
<span id="2839">2839</span>
<span id="2840">2840</span>
<span id="2841">2841</span>
<span id="2842">2842</span>
<span id="2843">2843</span>
<span id="2844">2844</span>
<span id="2845">2845</span>
<span id="2846">2846</span>
<span id="2847">2847</span>
<span id="2848">2848</span>
<span id="2849">2849</span>
<span id="2850">2850</span>
<span id="2851">2851</span>
<span id="2852">2852</span>
<span id="2853">2853</span>
<span id="2854">2854</span>
<span id="2855">2855</span>
<span id="2856">2856</span>
<span id="2857">2857</span>
<span id="2858">2858</span>
<span id="2859">2859</span>
<span id="2860">2860</span>
<span id="2861">2861</span>
<span id="2862">2862</span>
<span id="2863">2863</span>
<span id="2864">2864</span>
<span id="2865">2865</span>
<span id="2866">2866</span>
<span id="2867">2867</span>
<span id="2868">2868</span>
<span id="2869">2869</span>
<span id="2870">2870</span>
<span id="2871">2871</span>
<span id="2872">2872</span>
<span id="2873">2873</span>
<span id="2874">2874</span>
<span id="2875">2875</span>
<span id="2876">2876</span>
<span id="2877">2877</span>
<span id="2878">2878</span>
<span id="2879">2879</span>
<span id="2880">2880</span>
<span id="2881">2881</span>
<span id="2882">2882</span>
<span id="2883">2883</span>
<span id="2884">2884</span>
<span id="2885">2885</span>
<span id="2886">2886</span>
<span id="2887">2887</span>
<span id="2888">2888</span>
<span id="2889">2889</span>
<span id="2890">2890</span>
<span id="2891">2891</span>
<span id="2892">2892</span>
<span id="2893">2893</span>
<span id="2894">2894</span>
<span id="2895">2895</span>
<span id="2896">2896</span>
<span id="2897">2897</span>
<span id="2898">2898</span>
<span id="2899">2899</span>
<span id="2900">2900</span>
<span id="2901">2901</span>
<span id="2902">2902</span>
<span id="2903">2903</span>
<span id="2904">2904</span>
<span id="2905">2905</span>
<span id="2906">2906</span>
<span id="2907">2907</span>
<span id="2908">2908</span>
<span id="2909">2909</span>
<span id="2910">2910</span>
<span id="2911">2911</span>
<span id="2912">2912</span>
<span id="2913">2913</span>
<span id="2914">2914</span>
<span id="2915">2915</span>
<span id="2916">2916</span>
<span id="2917">2917</span>
<span id="2918">2918</span>
<span id="2919">2919</span>
<span id="2920">2920</span>
<span id="2921">2921</span>
<span id="2922">2922</span>
<span id="2923">2923</span>
<span id="2924">2924</span>
<span id="2925">2925</span>
<span id="2926">2926</span>
<span id="2927">2927</span>
<span id="2928">2928</span>
<span id="2929">2929</span>
<span id="2930">2930</span>
<span id="2931">2931</span>
<span id="2932">2932</span>
<span id="2933">2933</span>
<span id="2934">2934</span>
<span id="2935">2935</span>
<span id="2936">2936</span>
<span id="2937">2937</span>
<span id="2938">2938</span>
<span id="2939">2939</span>
<span id="2940">2940</span>
<span id="2941">2941</span>
<span id="2942">2942</span>
<span id="2943">2943</span>
<span id="2944">2944</span>
<span id="2945">2945</span>
<span id="2946">2946</span>
<span id="2947">2947</span>
<span id="2948">2948</span>
<span id="2949">2949</span>
<span id="2950">2950</span>
<span id="2951">2951</span>
<span id="2952">2952</span>
<span id="2953">2953</span>
<span id="2954">2954</span>
<span id="2955">2955</span>
<span id="2956">2956</span>
<span id="2957">2957</span>
<span id="2958">2958</span>
<span id="2959">2959</span>
<span id="2960">2960</span>
<span id="2961">2961</span>
<span id="2962">2962</span>
<span id="2963">2963</span>
<span id="2964">2964</span>
<span id="2965">2965</span>
<span id="2966">2966</span>
<span id="2967">2967</span>
<span id="2968">2968</span>
<span id="2969">2969</span>
<span id="2970">2970</span>
<span id="2971">2971</span>
<span id="2972">2972</span>
<span id="2973">2973</span>
<span id="2974">2974</span>
<span id="2975">2975</span>
<span id="2976">2976</span>
<span id="2977">2977</span>
<span id="2978">2978</span>
<span id="2979">2979</span>
<span id="2980">2980</span>
<span id="2981">2981</span>
<span id="2982">2982</span>
<span id="2983">2983</span>
<span id="2984">2984</span>
<span id="2985">2985</span>
<span id="2986">2986</span>
<span id="2987">2987</span>
<span id="2988">2988</span>
<span id="2989">2989</span>
<span id="2990">2990</span>
<span id="2991">2991</span>
<span id="2992">2992</span>
<span id="2993">2993</span>
<span id="2994">2994</span>
<span id="2995">2995</span>
<span id="2996">2996</span>
<span id="2997">2997</span>
<span id="2998">2998</span>
<span id="2999">2999</span>
<span id="3000">3000</span>
<span id="3001">3001</span>
<span id="3002">3002</span>
<span id="3003">3003</span>
<span id="3004">3004</span>
<span id="3005">3005</span>
<span id="3006">3006</span>
<span id="3007">3007</span>
<span id="3008">3008</span>
<span id="3009">3009</span>
<span id="3010">3010</span>
<span id="3011">3011</span>
<span id="3012">3012</span>
<span id="3013">3013</span>
<span id="3014">3014</span>
<span id="3015">3015</span>
<span id="3016">3016</span>
<span id="3017">3017</span>
<span id="3018">3018</span>
<span id="3019">3019</span>
<span id="3020">3020</span>
<span id="3021">3021</span>
<span id="3022">3022</span>
<span id="3023">3023</span>
<span id="3024">3024</span>
<span id="3025">3025</span>
<span id="3026">3026</span>
<span id="3027">3027</span>
<span id="3028">3028</span>
<span id="3029">3029</span>
<span id="3030">3030</span>
<span id="3031">3031</span>
<span id="3032">3032</span>
<span id="3033">3033</span>
<span id="3034">3034</span>
<span id="3035">3035</span>
<span id="3036">3036</span>
<span id="3037">3037</span>
<span id="3038">3038</span>
<span id="3039">3039</span>
<span id="3040">3040</span>
<span id="3041">3041</span>
<span id="3042">3042</span>
<span id="3043">3043</span>
<span id="3044">3044</span>
<span id="3045">3045</span>
<span id="3046">3046</span>
<span id="3047">3047</span>
<span id="3048">3048</span>
<span id="3049">3049</span>
<span id="3050">3050</span>
<span id="3051">3051</span>
<span id="3052">3052</span>
<span id="3053">3053</span>
<span id="3054">3054</span>
<span id="3055">3055</span>
<span id="3056">3056</span>
<span id="3057">3057</span>
<span id="3058">3058</span>
<span id="3059">3059</span>
<span id="3060">3060</span>
<span id="3061">3061</span>
<span id="3062">3062</span>
<span id="3063">3063</span>
<span id="3064">3064</span>
<span id="3065">3065</span>
<span id="3066">3066</span>
<span id="3067">3067</span>
<span id="3068">3068</span>
<span id="3069">3069</span>
<span id="3070">3070</span>
<span id="3071">3071</span>
<span id="3072">3072</span>
<span id="3073">3073</span>
<span id="3074">3074</span>
<span id="3075">3075</span>
<span id="3076">3076</span>
<span id="3077">3077</span>
<span id="3078">3078</span>
<span id="3079">3079</span>
<span id="3080">3080</span>
<span id="3081">3081</span>
<span id="3082">3082</span>
<span id="3083">3083</span>
<span id="3084">3084</span>
<span id="3085">3085</span>
<span id="3086">3086</span>
<span id="3087">3087</span>
<span id="3088">3088</span>
<span id="3089">3089</span>
<span id="3090">3090</span>
<span id="3091">3091</span>
<span id="3092">3092</span>
<span id="3093">3093</span>
<span id="3094">3094</span>
<span id="3095">3095</span>
<span id="3096">3096</span>
<span id="3097">3097</span>
<span id="3098">3098</span>
<span id="3099">3099</span>
<span id="3100">3100</span>
<span id="3101">3101</span>
<span id="3102">3102</span>
<span id="3103">3103</span>
<span id="3104">3104</span>
<span id="3105">3105</span>
<span id="3106">3106</span>
<span id="3107">3107</span>
<span id="3108">3108</span>
<span id="3109">3109</span>
<span id="3110">3110</span>
<span id="3111">3111</span>
<span id="3112">3112</span>
<span id="3113">3113</span>
<span id="3114">3114</span>
<span id="3115">3115</span>
<span id="3116">3116</span>
<span id="3117">3117</span>
<span id="3118">3118</span>
<span id="3119">3119</span>
<span id="3120">3120</span>
<span id="3121">3121</span>
<span id="3122">3122</span>
<span id="3123">3123</span>
<span id="3124">3124</span>
<span id="3125">3125</span>
<span id="3126">3126</span>
<span id="3127">3127</span>
<span id="3128">3128</span>
<span id="3129">3129</span>
<span id="3130">3130</span>
<span id="3131">3131</span>
<span id="3132">3132</span>
<span id="3133">3133</span>
<span id="3134">3134</span>
<span id="3135">3135</span>
<span id="3136">3136</span>
<span id="3137">3137</span>
<span id="3138">3138</span>
<span id="3139">3139</span>
<span id="3140">3140</span>
<span id="3141">3141</span>
<span id="3142">3142</span>
<span id="3143">3143</span>
<span id="3144">3144</span>
<span id="3145">3145</span>
<span id="3146">3146</span>
<span id="3147">3147</span>
<span id="3148">3148</span>
<span id="3149">3149</span>
<span id="3150">3150</span>
<span id="3151">3151</span>
<span id="3152">3152</span>
<span id="3153">3153</span>
<span id="3154">3154</span>
<span id="3155">3155</span>
<span id="3156">3156</span>
<span id="3157">3157</span>
<span id="3158">3158</span>
<span id="3159">3159</span>
<span id="3160">3160</span>
<span id="3161">3161</span>
<span id="3162">3162</span>
<span id="3163">3163</span>
<span id="3164">3164</span>
<span id="3165">3165</span>
<span id="3166">3166</span>
<span id="3167">3167</span>
<span id="3168">3168</span>
<span id="3169">3169</span>
<span id="3170">3170</span>
<span id="3171">3171</span>
<span id="3172">3172</span>
<span id="3173">3173</span>
<span id="3174">3174</span>
<span id="3175">3175</span>
<span id="3176">3176</span>
<span id="3177">3177</span>
<span id="3178">3178</span>
<span id="3179">3179</span>
<span id="3180">3180</span>
<span id="3181">3181</span>
<span id="3182">3182</span>
<span id="3183">3183</span>
<span id="3184">3184</span>
<span id="3185">3185</span>
<span id="3186">3186</span>
<span id="3187">3187</span>
<span id="3188">3188</span>
<span id="3189">3189</span>
<span id="3190">3190</span>
<span id="3191">3191</span>
<span id="3192">3192</span>
<span id="3193">3193</span>
<span id="3194">3194</span>
<span id="3195">3195</span>
<span id="3196">3196</span>
<span id="3197">3197</span>
<span id="3198">3198</span>
<span id="3199">3199</span>
<span id="3200">3200</span>
<span id="3201">3201</span>
<span id="3202">3202</span>
<span id="3203">3203</span>
<span id="3204">3204</span>
<span id="3205">3205</span>
<span id="3206">3206</span>
<span id="3207">3207</span>
<span id="3208">3208</span>
<span id="3209">3209</span>
<span id="3210">3210</span>
<span id="3211">3211</span>
<span id="3212">3212</span>
<span id="3213">3213</span>
<span id="3214">3214</span>
<span id="3215">3215</span>
<span id="3216">3216</span>
<span id="3217">3217</span>
<span id="3218">3218</span>
<span id="3219">3219</span>
<span id="3220">3220</span>
<span id="3221">3221</span>
<span id="3222">3222</span>
<span id="3223">3223</span>
<span id="3224">3224</span>
<span id="3225">3225</span>
<span id="3226">3226</span>
<span id="3227">3227</span>
<span id="3228">3228</span>
<span id="3229">3229</span>
<span id="3230">3230</span>
<span id="3231">3231</span>
<span id="3232">3232</span>
<span id="3233">3233</span>
<span id="3234">3234</span>
<span id="3235">3235</span>
<span id="3236">3236</span>
<span id="3237">3237</span>
<span id="3238">3238</span>
<span id="3239">3239</span>
<span id="3240">3240</span>
<span id="3241">3241</span>
<span id="3242">3242</span>
<span id="3243">3243</span>
<span id="3244">3244</span>
<span id="3245">3245</span>
<span id="3246">3246</span>
<span id="3247">3247</span>
<span id="3248">3248</span>
<span id="3249">3249</span>
<span id="3250">3250</span>
<span id="3251">3251</span>
<span id="3252">3252</span>
<span id="3253">3253</span>
<span id="3254">3254</span>
<span id="3255">3255</span>
<span id="3256">3256</span>
<span id="3257">3257</span>
<span id="3258">3258</span>
<span id="3259">3259</span>
<span id="3260">3260</span>
<span id="3261">3261</span>
<span id="3262">3262</span>
<span id="3263">3263</span>
<span id="3264">3264</span>
<span id="3265">3265</span>
<span id="3266">3266</span>
<span id="3267">3267</span>
<span id="3268">3268</span>
<span id="3269">3269</span>
<span id="3270">3270</span>
<span id="3271">3271</span>
<span id="3272">3272</span>
<span id="3273">3273</span>
<span id="3274">3274</span>
<span id="3275">3275</span>
<span id="3276">3276</span>
<span id="3277">3277</span>
<span id="3278">3278</span>
<span id="3279">3279</span>
<span id="3280">3280</span>
<span id="3281">3281</span>
<span id="3282">3282</span>
<span id="3283">3283</span>
<span id="3284">3284</span>
<span id="3285">3285</span>
<span id="3286">3286</span>
<span id="3287">3287</span>
<span id="3288">3288</span>
<span id="3289">3289</span>
<span id="3290">3290</span>
<span id="3291">3291</span>
<span id="3292">3292</span>
<span id="3293">3293</span>
<span id="3294">3294</span>
<span id="3295">3295</span>
<span id="3296">3296</span>
<span id="3297">3297</span>
<span id="3298">3298</span>
<span id="3299">3299</span>
<span id="3300">3300</span>
<span id="3301">3301</span>
<span id="3302">3302</span>
<span id="3303">3303</span>
<span id="3304">3304</span>
<span id="3305">3305</span>
<span id="3306">3306</span>
<span id="3307">3307</span>
<span id="3308">3308</span>
<span id="3309">3309</span>
<span id="3310">3310</span>
<span id="3311">3311</span>
<span id="3312">3312</span>
<span id="3313">3313</span>
<span id="3314">3314</span>
<span id="3315">3315</span>
<span id="3316">3316</span>
<span id="3317">3317</span>
<span id="3318">3318</span>
<span id="3319">3319</span>
<span id="3320">3320</span>
<span id="3321">3321</span>
<span id="3322">3322</span>
<span id="3323">3323</span>
<span id="3324">3324</span>
<span id="3325">3325</span>
<span id="3326">3326</span>
<span id="3327">3327</span>
<span id="3328">3328</span>
<span id="3329">3329</span>
<span id="3330">3330</span>
<span id="3331">3331</span>
<span id="3332">3332</span>
<span id="3333">3333</span>
<span id="3334">3334</span>
<span id="3335">3335</span>
<span id="3336">3336</span>
<span id="3337">3337</span>
<span id="3338">3338</span>
<span id="3339">3339</span>
<span id="3340">3340</span>
<span id="3341">3341</span>
<span id="3342">3342</span>
<span id="3343">3343</span>
<span id="3344">3344</span>
<span id="3345">3345</span>
<span id="3346">3346</span>
<span id="3347">3347</span>
<span id="3348">3348</span>
<span id="3349">3349</span>
<span id="3350">3350</span>
<span id="3351">3351</span>
<span id="3352">3352</span>
<span id="3353">3353</span>
<span id="3354">3354</span>
<span id="3355">3355</span>
<span id="3356">3356</span>
<span id="3357">3357</span>
<span id="3358">3358</span>
<span id="3359">3359</span>
<span id="3360">3360</span>
<span id="3361">3361</span>
<span id="3362">3362</span>
<span id="3363">3363</span>
<span id="3364">3364</span>
<span id="3365">3365</span>
<span id="3366">3366</span>
<span id="3367">3367</span>
<span id="3368">3368</span>
<span id="3369">3369</span>
<span id="3370">3370</span>
<span id="3371">3371</span>
<span id="3372">3372</span>
<span id="3373">3373</span>
<span id="3374">3374</span>
<span id="3375">3375</span>
<span id="3376">3376</span>
<span id="3377">3377</span>
<span id="3378">3378</span>
<span id="3379">3379</span>
<span id="3380">3380</span>
<span id="3381">3381</span>
<span id="3382">3382</span>
<span id="3383">3383</span>
<span id="3384">3384</span>
<span id="3385">3385</span>
<span id="3386">3386</span>
<span id="3387">3387</span>
<span id="3388">3388</span>
<span id="3389">3389</span>
<span id="3390">3390</span>
<span id="3391">3391</span>
<span id="3392">3392</span>
<span id="3393">3393</span>
<span id="3394">3394</span>
<span id="3395">3395</span>
<span id="3396">3396</span>
<span id="3397">3397</span>
<span id="3398">3398</span>
<span id="3399">3399</span>
<span id="3400">3400</span>
<span id="3401">3401</span>
<span id="3402">3402</span>
<span id="3403">3403</span>
<span id="3404">3404</span>
<span id="3405">3405</span>
<span id="3406">3406</span>
<span id="3407">3407</span>
<span id="3408">3408</span>
<span id="3409">3409</span>
<span id="3410">3410</span>
<span id="3411">3411</span>
<span id="3412">3412</span>
<span id="3413">3413</span>
<span id="3414">3414</span>
<span id="3415">3415</span>
<span id="3416">3416</span>
<span id="3417">3417</span>
<span id="3418">3418</span>
<span id="3419">3419</span>
<span id="3420">3420</span>
<span id="3421">3421</span>
<span id="3422">3422</span>
<span id="3423">3423</span>
<span id="3424">3424</span>
<span id="3425">3425</span>
<span id="3426">3426</span>
<span id="3427">3427</span>
<span id="3428">3428</span>
<span id="3429">3429</span>
<span id="3430">3430</span>
<span id="3431">3431</span>
<span id="3432">3432</span>
<span id="3433">3433</span>
<span id="3434">3434</span>
<span id="3435">3435</span>
<span id="3436">3436</span>
<span id="3437">3437</span>
<span id="3438">3438</span>
<span id="3439">3439</span>
<span id="3440">3440</span>
<span id="3441">3441</span>
<span id="3442">3442</span>
<span id="3443">3443</span>
<span id="3444">3444</span>
<span id="3445">3445</span>
<span id="3446">3446</span>
<span id="3447">3447</span>
<span id="3448">3448</span>
<span id="3449">3449</span>
<span id="3450">3450</span>
<span id="3451">3451</span>
<span id="3452">3452</span>
<span id="3453">3453</span>
<span id="3454">3454</span>
<span id="3455">3455</span>
<span id="3456">3456</span>
<span id="3457">3457</span>
<span id="3458">3458</span>
<span id="3459">3459</span>
<span id="3460">3460</span>
<span id="3461">3461</span>
<span id="3462">3462</span>
<span id="3463">3463</span>
<span id="3464">3464</span>
<span id="3465">3465</span>
<span id="3466">3466</span>
<span id="3467">3467</span>
<span id="3468">3468</span>
<span id="3469">3469</span>
<span id="3470">3470</span>
<span id="3471">3471</span>
<span id="3472">3472</span>
<span id="3473">3473</span>
<span id="3474">3474</span>
<span id="3475">3475</span>
<span id="3476">3476</span>
<span id="3477">3477</span>
<span id="3478">3478</span>
<span id="3479">3479</span>
<span id="3480">3480</span>
<span id="3481">3481</span>
<span id="3482">3482</span>
<span id="3483">3483</span>
<span id="3484">3484</span>
<span id="3485">3485</span>
<span id="3486">3486</span>
<span id="3487">3487</span>
<span id="3488">3488</span>
<span id="3489">3489</span>
<span id="3490">3490</span>
<span id="3491">3491</span>
<span id="3492">3492</span>
<span id="3493">3493</span>
<span id="3494">3494</span>
<span id="3495">3495</span>
<span id="3496">3496</span>
<span id="3497">3497</span>
<span id="3498">3498</span>
<span id="3499">3499</span>
<span id="3500">3500</span>
<span id="3501">3501</span>
<span id="3502">3502</span>
<span id="3503">3503</span>
<span id="3504">3504</span>
<span id="3505">3505</span>
<span id="3506">3506</span>
<span id="3507">3507</span>
<span id="3508">3508</span>
<span id="3509">3509</span>
<span id="3510">3510</span>
<span id="3511">3511</span>
<span id="3512">3512</span>
<span id="3513">3513</span>
<span id="3514">3514</span>
<span id="3515">3515</span>
<span id="3516">3516</span>
<span id="3517">3517</span>
<span id="3518">3518</span>
<span id="3519">3519</span>
<span id="3520">3520</span>
<span id="3521">3521</span>
<span id="3522">3522</span>
<span id="3523">3523</span>
<span id="3524">3524</span>
<span id="3525">3525</span>
<span id="3526">3526</span>
<span id="3527">3527</span>
<span id="3528">3528</span>
<span id="3529">3529</span>
<span id="3530">3530</span>
<span id="3531">3531</span>
<span id="3532">3532</span>
<span id="3533">3533</span>
<span id="3534">3534</span>
<span id="3535">3535</span>
<span id="3536">3536</span>
<span id="3537">3537</span>
<span id="3538">3538</span>
<span id="3539">3539</span>
<span id="3540">3540</span>
<span id="3541">3541</span>
<span id="3542">3542</span>
<span id="3543">3543</span>
<span id="3544">3544</span>
<span id="3545">3545</span>
<span id="3546">3546</span>
<span id="3547">3547</span>
<span id="3548">3548</span>
<span id="3549">3549</span>
<span id="3550">3550</span>
<span id="3551">3551</span>
<span id="3552">3552</span>
<span id="3553">3553</span>
<span id="3554">3554</span>
<span id="3555">3555</span>
<span id="3556">3556</span>
<span id="3557">3557</span>
<span id="3558">3558</span>
<span id="3559">3559</span>
<span id="3560">3560</span>
<span id="3561">3561</span>
<span id="3562">3562</span>
<span id="3563">3563</span>
<span id="3564">3564</span>
<span id="3565">3565</span>
<span id="3566">3566</span>
<span id="3567">3567</span>
<span id="3568">3568</span>
<span id="3569">3569</span>
<span id="3570">3570</span>
<span id="3571">3571</span>
<span id="3572">3572</span>
<span id="3573">3573</span>
<span id="3574">3574</span>
<span id="3575">3575</span>
<span id="3576">3576</span>
<span id="3577">3577</span>
<span id="3578">3578</span>
<span id="3579">3579</span>
<span id="3580">3580</span>
<span id="3581">3581</span>
<span id="3582">3582</span>
<span id="3583">3583</span>
<span id="3584">3584</span>
<span id="3585">3585</span>
<span id="3586">3586</span>
<span id="3587">3587</span>
<span id="3588">3588</span>
<span id="3589">3589</span>
<span id="3590">3590</span>
<span id="3591">3591</span>
<span id="3592">3592</span>
<span id="3593">3593</span>
<span id="3594">3594</span>
<span id="3595">3595</span>
<span id="3596">3596</span>
<span id="3597">3597</span>
<span id="3598">3598</span>
<span id="3599">3599</span>
<span id="3600">3600</span>
<span id="3601">3601</span>
<span id="3602">3602</span>
<span id="3603">3603</span>
<span id="3604">3604</span>
<span id="3605">3605</span>
<span id="3606">3606</span>
<span id="3607">3607</span>
<span id="3608">3608</span>
<span id="3609">3609</span>
<span id="3610">3610</span>
<span id="3611">3611</span>
<span id="3612">3612</span>
<span id="3613">3613</span>
<span id="3614">3614</span>
<span id="3615">3615</span>
<span id="3616">3616</span>
<span id="3617">3617</span>
<span id="3618">3618</span>
<span id="3619">3619</span>
<span id="3620">3620</span>
<span id="3621">3621</span>
<span id="3622">3622</span>
<span id="3623">3623</span>
<span id="3624">3624</span>
<span id="3625">3625</span>
<span id="3626">3626</span>
<span id="3627">3627</span>
<span id="3628">3628</span>
<span id="3629">3629</span>
<span id="3630">3630</span>
<span id="3631">3631</span>
<span id="3632">3632</span>
<span id="3633">3633</span>
<span id="3634">3634</span>
<span id="3635">3635</span>
<span id="3636">3636</span>
<span id="3637">3637</span>
<span id="3638">3638</span>
<span id="3639">3639</span>
<span id="3640">3640</span>
<span id="3641">3641</span>
<span id="3642">3642</span>
<span id="3643">3643</span>
<span id="3644">3644</span>
<span id="3645">3645</span>
<span id="3646">3646</span>
<span id="3647">3647</span>
<span id="3648">3648</span>
<span id="3649">3649</span>
<span id="3650">3650</span>
<span id="3651">3651</span>
<span id="3652">3652</span>
<span id="3653">3653</span>
<span id="3654">3654</span>
<span id="3655">3655</span>
<span id="3656">3656</span>
<span id="3657">3657</span>
<span id="3658">3658</span>
<span id="3659">3659</span>
<span id="3660">3660</span>
<span id="3661">3661</span>
<span id="3662">3662</span>
<span id="3663">3663</span>
<span id="3664">3664</span>
<span id="3665">3665</span>
<span id="3666">3666</span>
<span id="3667">3667</span>
<span id="3668">3668</span>
<span id="3669">3669</span>
<span id="3670">3670</span>
<span id="3671">3671</span>
<span id="3672">3672</span>
<span id="3673">3673</span>
<span id="3674">3674</span>
<span id="3675">3675</span>
<span id="3676">3676</span>
<span id="3677">3677</span>
<span id="3678">3678</span>
<span id="3679">3679</span>
<span id="3680">3680</span>
<span id="3681">3681</span>
<span id="3682">3682</span>
<span id="3683">3683</span>
<span id="3684">3684</span>
<span id="3685">3685</span>
<span id="3686">3686</span>
<span id="3687">3687</span>
<span id="3688">3688</span>
<span id="3689">3689</span>
<span id="3690">3690</span>
<span id="3691">3691</span>
<span id="3692">3692</span>
<span id="3693">3693</span>
<span id="3694">3694</span>
<span id="3695">3695</span>
<span id="3696">3696</span>
<span id="3697">3697</span>
<span id="3698">3698</span>
<span id="3699">3699</span>
<span id="3700">3700</span>
<span id="3701">3701</span>
<span id="3702">3702</span>
<span id="3703">3703</span>
<span id="3704">3704</span>
<span id="3705">3705</span>
<span id="3706">3706</span>
<span id="3707">3707</span>
<span id="3708">3708</span>
<span id="3709">3709</span>
<span id="3710">3710</span>
<span id="3711">3711</span>
<span id="3712">3712</span>
<span id="3713">3713</span>
<span id="3714">3714</span>
<span id="3715">3715</span>
<span id="3716">3716</span>
<span id="3717">3717</span>
<span id="3718">3718</span>
<span id="3719">3719</span>
<span id="3720">3720</span>
<span id="3721">3721</span>
<span id="3722">3722</span>
<span id="3723">3723</span>
<span id="3724">3724</span>
<span id="3725">3725</span>
<span id="3726">3726</span>
<span id="3727">3727</span>
<span id="3728">3728</span>
<span id="3729">3729</span>
<span id="3730">3730</span>
<span id="3731">3731</span>
<span id="3732">3732</span>
<span id="3733">3733</span>
<span id="3734">3734</span>
<span id="3735">3735</span>
<span id="3736">3736</span>
<span id="3737">3737</span>
<span id="3738">3738</span>
<span id="3739">3739</span>
<span id="3740">3740</span>
<span id="3741">3741</span>
<span id="3742">3742</span>
<span id="3743">3743</span>
<span id="3744">3744</span>
<span id="3745">3745</span>
<span id="3746">3746</span>
<span id="3747">3747</span>
<span id="3748">3748</span>
<span id="3749">3749</span>
<span id="3750">3750</span>
<span id="3751">3751</span>
<span id="3752">3752</span>
<span id="3753">3753</span>
<span id="3754">3754</span>
<span id="3755">3755</span>
<span id="3756">3756</span>
<span id="3757">3757</span>
<span id="3758">3758</span>
<span id="3759">3759</span>
<span id="3760">3760</span>
<span id="3761">3761</span>
<span id="3762">3762</span>
<span id="3763">3763</span>
<span id="3764">3764</span>
<span id="3765">3765</span>
<span id="3766">3766</span>
<span id="3767">3767</span>
<span id="3768">3768</span>
<span id="3769">3769</span>
<span id="3770">3770</span>
<span id="3771">3771</span>
<span id="3772">3772</span>
<span id="3773">3773</span>
<span id="3774">3774</span>
<span id="3775">3775</span>
<span id="3776">3776</span>
<span id="3777">3777</span>
<span id="3778">3778</span>
<span id="3779">3779</span>
<span id="3780">3780</span>
<span id="3781">3781</span>
<span id="3782">3782</span>
<span id="3783">3783</span>
<span id="3784">3784</span>
<span id="3785">3785</span>
<span id="3786">3786</span>
<span id="3787">3787</span>
<span id="3788">3788</span>
<span id="3789">3789</span>
<span id="3790">3790</span>
<span id="3791">3791</span>
<span id="3792">3792</span>
<span id="3793">3793</span>
<span id="3794">3794</span>
<span id="3795">3795</span>
<span id="3796">3796</span>
<span id="3797">3797</span>
<span id="3798">3798</span>
<span id="3799">3799</span>
<span id="3800">3800</span>
<span id="3801">3801</span>
<span id="3802">3802</span>
<span id="3803">3803</span>
<span id="3804">3804</span>
<span id="3805">3805</span>
<span id="3806">3806</span>
<span id="3807">3807</span>
<span id="3808">3808</span>
<span id="3809">3809</span>
<span id="3810">3810</span>
<span id="3811">3811</span>
<span id="3812">3812</span>
<span id="3813">3813</span>
<span id="3814">3814</span>
<span id="3815">3815</span>
<span id="3816">3816</span>
<span id="3817">3817</span>
<span id="3818">3818</span>
<span id="3819">3819</span>
<span id="3820">3820</span>
<span id="3821">3821</span>
<span id="3822">3822</span>
<span id="3823">3823</span>
<span id="3824">3824</span>
<span id="3825">3825</span>
<span id="3826">3826</span>
<span id="3827">3827</span>
<span id="3828">3828</span>
<span id="3829">3829</span>
<span id="3830">3830</span>
<span id="3831">3831</span>
<span id="3832">3832</span>
<span id="3833">3833</span>
<span id="3834">3834</span>
<span id="3835">3835</span>
<span id="3836">3836</span>
<span id="3837">3837</span>
<span id="3838">3838</span>
<span id="3839">3839</span>
<span id="3840">3840</span>
<span id="3841">3841</span>
<span id="3842">3842</span>
<span id="3843">3843</span>
<span id="3844">3844</span>
<span id="3845">3845</span>
<span id="3846">3846</span>
<span id="3847">3847</span>
<span id="3848">3848</span>
<span id="3849">3849</span>
<span id="3850">3850</span>
<span id="3851">3851</span>
<span id="3852">3852</span>
<span id="3853">3853</span>
<span id="3854">3854</span>
<span id="3855">3855</span>
<span id="3856">3856</span>
<span id="3857">3857</span>
<span id="3858">3858</span>
<span id="3859">3859</span>
<span id="3860">3860</span>
<span id="3861">3861</span>
<span id="3862">3862</span>
<span id="3863">3863</span>
<span id="3864">3864</span>
<span id="3865">3865</span>
<span id="3866">3866</span>
<span id="3867">3867</span>
<span id="3868">3868</span>
<span id="3869">3869</span>
<span id="3870">3870</span>
<span id="3871">3871</span>
<span id="3872">3872</span>
<span id="3873">3873</span>
<span id="3874">3874</span>
<span id="3875">3875</span>
<span id="3876">3876</span>
<span id="3877">3877</span>
<span id="3878">3878</span>
<span id="3879">3879</span>
<span id="3880">3880</span>
<span id="3881">3881</span>
<span id="3882">3882</span>
<span id="3883">3883</span>
<span id="3884">3884</span>
<span id="3885">3885</span>
<span id="3886">3886</span>
<span id="3887">3887</span>
<span id="3888">3888</span>
<span id="3889">3889</span>
<span id="3890">3890</span>
<span id="3891">3891</span>
<span id="3892">3892</span>
<span id="3893">3893</span>
<span id="3894">3894</span>
<span id="3895">3895</span>
<span id="3896">3896</span>
<span id="3897">3897</span>
<span id="3898">3898</span>
<span id="3899">3899</span>
<span id="3900">3900</span>
<span id="3901">3901</span>
<span id="3902">3902</span>
<span id="3903">3903</span>
<span id="3904">3904</span>
<span id="3905">3905</span>
<span id="3906">3906</span>
<span id="3907">3907</span>
<span id="3908">3908</span>
<span id="3909">3909</span>
<span id="3910">3910</span>
<span id="3911">3911</span>
<span id="3912">3912</span>
<span id="3913">3913</span>
<span id="3914">3914</span>
<span id="3915">3915</span>
<span id="3916">3916</span>
<span id="3917">3917</span>
<span id="3918">3918</span>
<span id="3919">3919</span>
<span id="3920">3920</span>
<span id="3921">3921</span>
<span id="3922">3922</span>
<span id="3923">3923</span>
<span id="3924">3924</span>
<span id="3925">3925</span>
<span id="3926">3926</span>
<span id="3927">3927</span>
<span id="3928">3928</span>
<span id="3929">3929</span>
<span id="3930">3930</span>
<span id="3931">3931</span>
<span id="3932">3932</span>
<span id="3933">3933</span>
<span id="3934">3934</span>
<span id="3935">3935</span>
<span id="3936">3936</span>
<span id="3937">3937</span>
<span id="3938">3938</span>
<span id="3939">3939</span>
<span id="3940">3940</span>
<span id="3941">3941</span>
<span id="3942">3942</span>
<span id="3943">3943</span>
<span id="3944">3944</span>
<span id="3945">3945</span>
<span id="3946">3946</span>
<span id="3947">3947</span>
<span id="3948">3948</span>
<span id="3949">3949</span>
<span id="3950">3950</span>
<span id="3951">3951</span>
<span id="3952">3952</span>
<span id="3953">3953</span>
<span id="3954">3954</span>
<span id="3955">3955</span>
<span id="3956">3956</span>
<span id="3957">3957</span>
<span id="3958">3958</span>
<span id="3959">3959</span>
<span id="3960">3960</span>
<span id="3961">3961</span>
<span id="3962">3962</span>
<span id="3963">3963</span>
<span id="3964">3964</span>
<span id="3965">3965</span>
<span id="3966">3966</span>
<span id="3967">3967</span>
<span id="3968">3968</span>
<span id="3969">3969</span>
<span id="3970">3970</span>
<span id="3971">3971</span>
<span id="3972">3972</span>
<span id="3973">3973</span>
<span id="3974">3974</span>
<span id="3975">3975</span>
<span id="3976">3976</span>
<span id="3977">3977</span>
<span id="3978">3978</span>
<span id="3979">3979</span>
<span id="3980">3980</span>
<span id="3981">3981</span>
<span id="3982">3982</span>
<span id="3983">3983</span>
<span id="3984">3984</span>
<span id="3985">3985</span>
<span id="3986">3986</span>
<span id="3987">3987</span>
<span id="3988">3988</span>
<span id="3989">3989</span>
<span id="3990">3990</span>
<span id="3991">3991</span>
<span id="3992">3992</span>
<span id="3993">3993</span>
<span id="3994">3994</span>
<span id="3995">3995</span>
<span id="3996">3996</span>
<span id="3997">3997</span>
<span id="3998">3998</span>
<span id="3999">3999</span>
<span id="4000">4000</span>
<span id="4001">4001</span>
<span id="4002">4002</span>
<span id="4003">4003</span>
<span id="4004">4004</span>
<span id="4005">4005</span>
<span id="4006">4006</span>
<span id="4007">4007</span>
<span id="4008">4008</span>
<span id="4009">4009</span>
<span id="4010">4010</span>
<span id="4011">4011</span>
<span id="4012">4012</span>
<span id="4013">4013</span>
<span id="4014">4014</span>
<span id="4015">4015</span>
<span id="4016">4016</span>
<span id="4017">4017</span>
<span id="4018">4018</span>
<span id="4019">4019</span>
<span id="4020">4020</span>
<span id="4021">4021</span>
<span id="4022">4022</span>
<span id="4023">4023</span>
<span id="4024">4024</span>
<span id="4025">4025</span>
<span id="4026">4026</span>
<span id="4027">4027</span>
<span id="4028">4028</span>
<span id="4029">4029</span>
<span id="4030">4030</span>
<span id="4031">4031</span>
<span id="4032">4032</span>
<span id="4033">4033</span>
<span id="4034">4034</span>
<span id="4035">4035</span>
<span id="4036">4036</span>
<span id="4037">4037</span>
<span id="4038">4038</span>
<span id="4039">4039</span>
<span id="4040">4040</span>
<span id="4041">4041</span>
<span id="4042">4042</span>
<span id="4043">4043</span>
<span id="4044">4044</span>
<span id="4045">4045</span>
<span id="4046">4046</span>
<span id="4047">4047</span>
<span id="4048">4048</span>
<span id="4049">4049</span>
<span id="4050">4050</span>
<span id="4051">4051</span>
<span id="4052">4052</span>
<span id="4053">4053</span>
<span id="4054">4054</span>
<span id="4055">4055</span>
<span id="4056">4056</span>
<span id="4057">4057</span>
<span id="4058">4058</span>
<span id="4059">4059</span>
<span id="4060">4060</span>
<span id="4061">4061</span>
<span id="4062">4062</span>
<span id="4063">4063</span>
<span id="4064">4064</span>
<span id="4065">4065</span>
<span id="4066">4066</span>
<span id="4067">4067</span>
<span id="4068">4068</span>
<span id="4069">4069</span>
<span id="4070">4070</span>
<span id="4071">4071</span>
<span id="4072">4072</span>
<span id="4073">4073</span>
<span id="4074">4074</span>
<span id="4075">4075</span>
<span id="4076">4076</span>
<span id="4077">4077</span>
<span id="4078">4078</span>
<span id="4079">4079</span>
<span id="4080">4080</span>
<span id="4081">4081</span>
<span id="4082">4082</span>
<span id="4083">4083</span>
<span id="4084">4084</span>
<span id="4085">4085</span>
<span id="4086">4086</span>
<span id="4087">4087</span>
<span id="4088">4088</span>
<span id="4089">4089</span>
<span id="4090">4090</span>
<span id="4091">4091</span>
<span id="4092">4092</span>
<span id="4093">4093</span>
<span id="4094">4094</span>
<span id="4095">4095</span>
<span id="4096">4096</span>
<span id="4097">4097</span>
<span id="4098">4098</span>
<span id="4099">4099</span>
<span id="4100">4100</span>
<span id="4101">4101</span>
<span id="4102">4102</span>
<span id="4103">4103</span>
<span id="4104">4104</span>
<span id="4105">4105</span>
<span id="4106">4106</span>
<span id="4107">4107</span>
<span id="4108">4108</span>
<span id="4109">4109</span>
<span id="4110">4110</span>
<span id="4111">4111</span>
<span id="4112">4112</span>
<span id="4113">4113</span>
<span id="4114">4114</span>
<span id="4115">4115</span>
<span id="4116">4116</span>
<span id="4117">4117</span>
<span id="4118">4118</span>
<span id="4119">4119</span>
<span id="4120">4120</span>
<span id="4121">4121</span>
<span id="4122">4122</span>
<span id="4123">4123</span>
<span id="4124">4124</span>
<span id="4125">4125</span>
<span id="4126">4126</span>
<span id="4127">4127</span>
<span id="4128">4128</span>
<span id="4129">4129</span>
<span id="4130">4130</span>
<span id="4131">4131</span>
<span id="4132">4132</span>
<span id="4133">4133</span>
<span id="4134">4134</span>
<span id="4135">4135</span>
<span id="4136">4136</span>
<span id="4137">4137</span>
<span id="4138">4138</span>
<span id="4139">4139</span>
<span id="4140">4140</span>
<span id="4141">4141</span>
<span id="4142">4142</span>
<span id="4143">4143</span>
<span id="4144">4144</span>
<span id="4145">4145</span>
<span id="4146">4146</span>
<span id="4147">4147</span>
<span id="4148">4148</span>
<span id="4149">4149</span>
<span id="4150">4150</span>
<span id="4151">4151</span>
<span id="4152">4152</span>
<span id="4153">4153</span>
<span id="4154">4154</span>
<span id="4155">4155</span>
<span id="4156">4156</span>
<span id="4157">4157</span>
<span id="4158">4158</span>
<span id="4159">4159</span>
<span id="4160">4160</span>
<span id="4161">4161</span>
<span id="4162">4162</span>
<span id="4163">4163</span>
<span id="4164">4164</span>
<span id="4165">4165</span>
<span id="4166">4166</span>
<span id="4167">4167</span>
<span id="4168">4168</span>
<span id="4169">4169</span>
<span id="4170">4170</span>
<span id="4171">4171</span>
<span id="4172">4172</span>
<span id="4173">4173</span>
<span id="4174">4174</span>
<span id="4175">4175</span>
<span id="4176">4176</span>
<span id="4177">4177</span>
<span id="4178">4178</span>
<span id="4179">4179</span>
<span id="4180">4180</span>
<span id="4181">4181</span>
<span id="4182">4182</span>
<span id="4183">4183</span>
<span id="4184">4184</span>
<span id="4185">4185</span>
<span id="4186">4186</span>
<span id="4187">4187</span>
<span id="4188">4188</span>
<span id="4189">4189</span>
<span id="4190">4190</span>
<span id="4191">4191</span>
<span id="4192">4192</span>
<span id="4193">4193</span>
<span id="4194">4194</span>
<span id="4195">4195</span>
<span id="4196">4196</span>
<span id="4197">4197</span>
<span id="4198">4198</span>
<span id="4199">4199</span>
<span id="4200">4200</span>
<span id="4201">4201</span>
<span id="4202">4202</span>
<span id="4203">4203</span>
<span id="4204">4204</span>
<span id="4205">4205</span>
<span id="4206">4206</span>
<span id="4207">4207</span>
<span id="4208">4208</span>
<span id="4209">4209</span>
<span id="4210">4210</span>
<span id="4211">4211</span>
<span id="4212">4212</span>
<span id="4213">4213</span>
<span id="4214">4214</span>
<span id="4215">4215</span>
<span id="4216">4216</span>
<span id="4217">4217</span>
<span id="4218">4218</span>
<span id="4219">4219</span>
<span id="4220">4220</span>
<span id="4221">4221</span>
<span id="4222">4222</span>
<span id="4223">4223</span>
<span id="4224">4224</span>
<span id="4225">4225</span>
<span id="4226">4226</span>
<span id="4227">4227</span>
<span id="4228">4228</span>
<span id="4229">4229</span>
<span id="4230">4230</span>
<span id="4231">4231</span>
<span id="4232">4232</span>
<span id="4233">4233</span>
<span id="4234">4234</span>
<span id="4235">4235</span>
<span id="4236">4236</span>
<span id="4237">4237</span>
<span id="4238">4238</span>
<span id="4239">4239</span>
<span id="4240">4240</span>
<span id="4241">4241</span>
<span id="4242">4242</span>
<span id="4243">4243</span>
<span id="4244">4244</span>
<span id="4245">4245</span>
<span id="4246">4246</span>
<span id="4247">4247</span>
<span id="4248">4248</span>
<span id="4249">4249</span>
<span id="4250">4250</span>
<span id="4251">4251</span>
<span id="4252">4252</span>
<span id="4253">4253</span>
<span id="4254">4254</span>
<span id="4255">4255</span>
<span id="4256">4256</span>
<span id="4257">4257</span>
<span id="4258">4258</span>
<span id="4259">4259</span>
<span id="4260">4260</span>
<span id="4261">4261</span>
<span id="4262">4262</span>
<span id="4263">4263</span>
<span id="4264">4264</span>
<span id="4265">4265</span>
<span id="4266">4266</span>
<span id="4267">4267</span>
<span id="4268">4268</span>
<span id="4269">4269</span>
<span id="4270">4270</span>
<span id="4271">4271</span>
<span id="4272">4272</span>
<span id="4273">4273</span>
<span id="4274">4274</span>
<span id="4275">4275</span>
<span id="4276">4276</span>
<span id="4277">4277</span>
<span id="4278">4278</span>
<span id="4279">4279</span>
<span id="4280">4280</span>
<span id="4281">4281</span>
<span id="4282">4282</span>
<span id="4283">4283</span>
<span id="4284">4284</span>
<span id="4285">4285</span>
<span id="4286">4286</span>
<span id="4287">4287</span>
<span id="4288">4288</span>
<span id="4289">4289</span>
<span id="4290">4290</span>
<span id="4291">4291</span>
<span id="4292">4292</span>
<span id="4293">4293</span>
<span id="4294">4294</span>
<span id="4295">4295</span>
<span id="4296">4296</span>
<span id="4297">4297</span>
<span id="4298">4298</span>
<span id="4299">4299</span>
<span id="4300">4300</span>
<span id="4301">4301</span>
<span id="4302">4302</span>
<span id="4303">4303</span>
<span id="4304">4304</span>
<span id="4305">4305</span>
<span id="4306">4306</span>
<span id="4307">4307</span>
<span id="4308">4308</span>
<span id="4309">4309</span>
<span id="4310">4310</span>
<span id="4311">4311</span>
<span id="4312">4312</span>
<span id="4313">4313</span>
<span id="4314">4314</span>
<span id="4315">4315</span>
<span id="4316">4316</span>
<span id="4317">4317</span>
<span id="4318">4318</span>
<span id="4319">4319</span>
<span id="4320">4320</span>
<span id="4321">4321</span>
<span id="4322">4322</span>
<span id="4323">4323</span>
<span id="4324">4324</span>
<span id="4325">4325</span>
<span id="4326">4326</span>
<span id="4327">4327</span>
<span id="4328">4328</span>
<span id="4329">4329</span>
<span id="4330">4330</span>
<span id="4331">4331</span>
<span id="4332">4332</span>
<span id="4333">4333</span>
<span id="4334">4334</span>
<span id="4335">4335</span>
<span id="4336">4336</span>
<span id="4337">4337</span>
<span id="4338">4338</span>
<span id="4339">4339</span>
<span id="4340">4340</span>
<span id="4341">4341</span>
<span id="4342">4342</span>
<span id="4343">4343</span>
<span id="4344">4344</span>
<span id="4345">4345</span>
<span id="4346">4346</span>
<span id="4347">4347</span>
<span id="4348">4348</span>
<span id="4349">4349</span>
<span id="4350">4350</span>
<span id="4351">4351</span>
<span id="4352">4352</span>
<span id="4353">4353</span>
<span id="4354">4354</span>
<span id="4355">4355</span>
<span id="4356">4356</span>
<span id="4357">4357</span>
<span id="4358">4358</span>
<span id="4359">4359</span>
<span id="4360">4360</span>
<span id="4361">4361</span>
<span id="4362">4362</span>
<span id="4363">4363</span>
<span id="4364">4364</span>
<span id="4365">4365</span>
<span id="4366">4366</span>
<span id="4367">4367</span>
<span id="4368">4368</span>
<span id="4369">4369</span>
<span id="4370">4370</span>
<span id="4371">4371</span>
<span id="4372">4372</span>
<span id="4373">4373</span>
<span id="4374">4374</span>
<span id="4375">4375</span>
<span id="4376">4376</span>
<span id="4377">4377</span>
<span id="4378">4378</span>
<span id="4379">4379</span>
<span id="4380">4380</span>
<span id="4381">4381</span>
<span id="4382">4382</span>
<span id="4383">4383</span>
<span id="4384">4384</span>
<span id="4385">4385</span>
<span id="4386">4386</span>
<span id="4387">4387</span>
<span id="4388">4388</span>
<span id="4389">4389</span>
<span id="4390">4390</span>
<span id="4391">4391</span>
<span id="4392">4392</span>
<span id="4393">4393</span>
<span id="4394">4394</span>
<span id="4395">4395</span>
<span id="4396">4396</span>
<span id="4397">4397</span>
<span id="4398">4398</span>
<span id="4399">4399</span>
<span id="4400">4400</span>
<span id="4401">4401</span>
<span id="4402">4402</span>
<span id="4403">4403</span>
<span id="4404">4404</span>
<span id="4405">4405</span>
<span id="4406">4406</span>
<span id="4407">4407</span>
<span id="4408">4408</span>
<span id="4409">4409</span>
<span id="4410">4410</span>
<span id="4411">4411</span>
<span id="4412">4412</span>
<span id="4413">4413</span>
<span id="4414">4414</span>
<span id="4415">4415</span>
<span id="4416">4416</span>
<span id="4417">4417</span>
<span id="4418">4418</span>
<span id="4419">4419</span>
<span id="4420">4420</span>
<span id="4421">4421</span>
<span id="4422">4422</span>
<span id="4423">4423</span>
<span id="4424">4424</span>
<span id="4425">4425</span>
<span id="4426">4426</span>
<span id="4427">4427</span>
<span id="4428">4428</span>
<span id="4429">4429</span>
<span id="4430">4430</span>
<span id="4431">4431</span>
<span id="4432">4432</span>
<span id="4433">4433</span>
<span id="4434">4434</span>
<span id="4435">4435</span>
<span id="4436">4436</span>
<span id="4437">4437</span>
<span id="4438">4438</span>
<span id="4439">4439</span>
<span id="4440">4440</span>
<span id="4441">4441</span>
<span id="4442">4442</span>
<span id="4443">4443</span>
<span id="4444">4444</span>
<span id="4445">4445</span>
<span id="4446">4446</span>
<span id="4447">4447</span>
<span id="4448">4448</span>
<span id="4449">4449</span>
<span id="4450">4450</span>
<span id="4451">4451</span>
<span id="4452">4452</span>
<span id="4453">4453</span>
<span id="4454">4454</span>
<span id="4455">4455</span>
<span id="4456">4456</span>
<span id="4457">4457</span>
<span id="4458">4458</span>
<span id="4459">4459</span>
<span id="4460">4460</span>
<span id="4461">4461</span>
<span id="4462">4462</span>
<span id="4463">4463</span>
<span id="4464">4464</span>
<span id="4465">4465</span>
<span id="4466">4466</span>
<span id="4467">4467</span>
<span id="4468">4468</span>
<span id="4469">4469</span>
<span id="4470">4470</span>
<span id="4471">4471</span>
<span id="4472">4472</span>
<span id="4473">4473</span>
<span id="4474">4474</span>
<span id="4475">4475</span>
<span id="4476">4476</span>
<span id="4477">4477</span>
<span id="4478">4478</span>
<span id="4479">4479</span>
<span id="4480">4480</span>
<span id="4481">4481</span>
<span id="4482">4482</span>
<span id="4483">4483</span>
<span id="4484">4484</span>
<span id="4485">4485</span>
<span id="4486">4486</span>
<span id="4487">4487</span>
<span id="4488">4488</span>
<span id="4489">4489</span>
<span id="4490">4490</span>
<span id="4491">4491</span>
<span id="4492">4492</span>
<span id="4493">4493</span>
<span id="4494">4494</span>
<span id="4495">4495</span>
<span id="4496">4496</span>
<span id="4497">4497</span>
<span id="4498">4498</span>
<span id="4499">4499</span>
<span id="4500">4500</span>
<span id="4501">4501</span>
<span id="4502">4502</span>
<span id="4503">4503</span>
<span id="4504">4504</span>
<span id="4505">4505</span>
<span id="4506">4506</span>
<span id="4507">4507</span>
<span id="4508">4508</span>
<span id="4509">4509</span>
<span id="4510">4510</span>
<span id="4511">4511</span>
<span id="4512">4512</span>
<span id="4513">4513</span>
<span id="4514">4514</span>
<span id="4515">4515</span>
<span id="4516">4516</span>
<span id="4517">4517</span>
<span id="4518">4518</span>
<span id="4519">4519</span>
<span id="4520">4520</span>
<span id="4521">4521</span>
<span id="4522">4522</span>
<span id="4523">4523</span>
<span id="4524">4524</span>
<span id="4525">4525</span>
<span id="4526">4526</span>
<span id="4527">4527</span>
<span id="4528">4528</span>
<span id="4529">4529</span>
<span id="4530">4530</span>
<span id="4531">4531</span>
<span id="4532">4532</span>
<span id="4533">4533</span>
<span id="4534">4534</span>
<span id="4535">4535</span>
<span id="4536">4536</span>
<span id="4537">4537</span>
<span id="4538">4538</span>
<span id="4539">4539</span>
<span id="4540">4540</span>
<span id="4541">4541</span>
<span id="4542">4542</span>
<span id="4543">4543</span>
<span id="4544">4544</span>
<span id="4545">4545</span>
<span id="4546">4546</span>
<span id="4547">4547</span>
<span id="4548">4548</span>
<span id="4549">4549</span>
<span id="4550">4550</span>
<span id="4551">4551</span>
<span id="4552">4552</span>
<span id="4553">4553</span>
<span id="4554">4554</span>
<span id="4555">4555</span>
<span id="4556">4556</span>
<span id="4557">4557</span>
<span id="4558">4558</span>
<span id="4559">4559</span>
<span id="4560">4560</span>
<span id="4561">4561</span>
<span id="4562">4562</span>
<span id="4563">4563</span>
<span id="4564">4564</span>
<span id="4565">4565</span>
<span id="4566">4566</span>
<span id="4567">4567</span>
<span id="4568">4568</span>
<span id="4569">4569</span>
<span id="4570">4570</span>
<span id="4571">4571</span>
<span id="4572">4572</span>
<span id="4573">4573</span>
<span id="4574">4574</span>
<span id="4575">4575</span>
<span id="4576">4576</span>
<span id="4577">4577</span>
<span id="4578">4578</span>
<span id="4579">4579</span>
<span id="4580">4580</span>
<span id="4581">4581</span>
<span id="4582">4582</span>
<span id="4583">4583</span>
<span id="4584">4584</span>
<span id="4585">4585</span>
<span id="4586">4586</span>
<span id="4587">4587</span>
<span id="4588">4588</span>
<span id="4589">4589</span>
<span id="4590">4590</span>
<span id="4591">4591</span>
<span id="4592">4592</span>
<span id="4593">4593</span>
<span id="4594">4594</span>
<span id="4595">4595</span>
<span id="4596">4596</span>
<span id="4597">4597</span>
<span id="4598">4598</span>
<span id="4599">4599</span>
<span id="4600">4600</span>
<span id="4601">4601</span>
<span id="4602">4602</span>
<span id="4603">4603</span>
<span id="4604">4604</span>
<span id="4605">4605</span>
<span id="4606">4606</span>
<span id="4607">4607</span>
<span id="4608">4608</span>
<span id="4609">4609</span>
<span id="4610">4610</span>
<span id="4611">4611</span>
<span id="4612">4612</span>
<span id="4613">4613</span>
<span id="4614">4614</span>
<span id="4615">4615</span>
<span id="4616">4616</span>
<span id="4617">4617</span>
<span id="4618">4618</span>
<span id="4619">4619</span>
<span id="4620">4620</span>
<span id="4621">4621</span>
<span id="4622">4622</span>
<span id="4623">4623</span>
<span id="4624">4624</span>
<span id="4625">4625</span>
<span id="4626">4626</span>
<span id="4627">4627</span>
<span id="4628">4628</span>
<span id="4629">4629</span>
<span id="4630">4630</span>
<span id="4631">4631</span>
<span id="4632">4632</span>
<span id="4633">4633</span>
<span id="4634">4634</span>
<span id="4635">4635</span>
<span id="4636">4636</span>
<span id="4637">4637</span>
<span id="4638">4638</span>
<span id="4639">4639</span>
<span id="4640">4640</span>
<span id="4641">4641</span>
<span id="4642">4642</span>
<span id="4643">4643</span>
<span id="4644">4644</span>
<span id="4645">4645</span>
<span id="4646">4646</span>
<span id="4647">4647</span>
<span id="4648">4648</span>
<span id="4649">4649</span>
<span id="4650">4650</span>
<span id="4651">4651</span>
<span id="4652">4652</span>
<span id="4653">4653</span>
<span id="4654">4654</span>
<span id="4655">4655</span>
<span id="4656">4656</span>
<span id="4657">4657</span>
<span id="4658">4658</span>
<span id="4659">4659</span>
<span id="4660">4660</span>
<span id="4661">4661</span>
<span id="4662">4662</span>
<span id="4663">4663</span>
<span id="4664">4664</span>
<span id="4665">4665</span>
<span id="4666">4666</span>
<span id="4667">4667</span>
<span id="4668">4668</span>
<span id="4669">4669</span>
<span id="4670">4670</span>
<span id="4671">4671</span>
<span id="4672">4672</span>
<span id="4673">4673</span>
<span id="4674">4674</span>
<span id="4675">4675</span>
<span id="4676">4676</span>
<span id="4677">4677</span>
<span id="4678">4678</span>
<span id="4679">4679</span>
<span id="4680">4680</span>
<span id="4681">4681</span>
<span id="4682">4682</span>
<span id="4683">4683</span>
<span id="4684">4684</span>
<span id="4685">4685</span>
<span id="4686">4686</span>
<span id="4687">4687</span>
<span id="4688">4688</span>
<span id="4689">4689</span>
<span id="4690">4690</span>
<span id="4691">4691</span>
<span id="4692">4692</span>
<span id="4693">4693</span>
<span id="4694">4694</span>
<span id="4695">4695</span>
<span id="4696">4696</span>
<span id="4697">4697</span>
<span id="4698">4698</span>
<span id="4699">4699</span>
<span id="4700">4700</span>
<span id="4701">4701</span>
<span id="4702">4702</span>
<span id="4703">4703</span>
<span id="4704">4704</span>
<span id="4705">4705</span>
<span id="4706">4706</span>
<span id="4707">4707</span>
<span id="4708">4708</span>
<span id="4709">4709</span>
<span id="4710">4710</span>
<span id="4711">4711</span>
<span id="4712">4712</span>
<span id="4713">4713</span>
<span id="4714">4714</span>
<span id="4715">4715</span>
<span id="4716">4716</span>
<span id="4717">4717</span>
<span id="4718">4718</span>
<span id="4719">4719</span>
<span id="4720">4720</span>
<span id="4721">4721</span>
<span id="4722">4722</span>
<span id="4723">4723</span>
<span id="4724">4724</span>
<span id="4725">4725</span>
<span id="4726">4726</span>
<span id="4727">4727</span>
<span id="4728">4728</span>
<span id="4729">4729</span>
<span id="4730">4730</span>
<span id="4731">4731</span>
<span id="4732">4732</span>
<span id="4733">4733</span>
<span id="4734">4734</span>
<span id="4735">4735</span>
<span id="4736">4736</span>
<span id="4737">4737</span>
<span id="4738">4738</span>
<span id="4739">4739</span>
<span id="4740">4740</span>
<span id="4741">4741</span>
<span id="4742">4742</span>
<span id="4743">4743</span>
<span id="4744">4744</span>
<span id="4745">4745</span>
<span id="4746">4746</span>
<span id="4747">4747</span>
<span id="4748">4748</span>
<span id="4749">4749</span>
<span id="4750">4750</span>
<span id="4751">4751</span>
<span id="4752">4752</span>
<span id="4753">4753</span>
<span id="4754">4754</span>
<span id="4755">4755</span>
<span id="4756">4756</span>
<span id="4757">4757</span>
<span id="4758">4758</span>
<span id="4759">4759</span>
<span id="4760">4760</span>
<span id="4761">4761</span>
<span id="4762">4762</span>
<span id="4763">4763</span>
<span id="4764">4764</span>
<span id="4765">4765</span>
<span id="4766">4766</span>
<span id="4767">4767</span>
<span id="4768">4768</span>
<span id="4769">4769</span>
<span id="4770">4770</span>
<span id="4771">4771</span>
<span id="4772">4772</span>
<span id="4773">4773</span>
<span id="4774">4774</span>
<span id="4775">4775</span>
<span id="4776">4776</span>
<span id="4777">4777</span>
<span id="4778">4778</span>
<span id="4779">4779</span>
<span id="4780">4780</span>
<span id="4781">4781</span>
<span id="4782">4782</span>
<span id="4783">4783</span>
<span id="4784">4784</span>
<span id="4785">4785</span>
<span id="4786">4786</span>
<span id="4787">4787</span>
<span id="4788">4788</span>
<span id="4789">4789</span>
<span id="4790">4790</span>
<span id="4791">4791</span>
<span id="4792">4792</span>
<span id="4793">4793</span>
<span id="4794">4794</span>
<span id="4795">4795</span>
<span id="4796">4796</span>
<span id="4797">4797</span>
<span id="4798">4798</span>
<span id="4799">4799</span>
<span id="4800">4800</span>
<span id="4801">4801</span>
<span id="4802">4802</span>
<span id="4803">4803</span>
<span id="4804">4804</span>
<span id="4805">4805</span>
<span id="4806">4806</span>
<span id="4807">4807</span>
<span id="4808">4808</span>
<span id="4809">4809</span>
<span id="4810">4810</span>
<span id="4811">4811</span>
<span id="4812">4812</span>
<span id="4813">4813</span>
<span id="4814">4814</span>
<span id="4815">4815</span>
<span id="4816">4816</span>
<span id="4817">4817</span>
<span id="4818">4818</span>
<span id="4819">4819</span>
<span id="4820">4820</span>
<span id="4821">4821</span>
<span id="4822">4822</span>
<span id="4823">4823</span>
<span id="4824">4824</span>
<span id="4825">4825</span>
<span id="4826">4826</span>
<span id="4827">4827</span>
<span id="4828">4828</span>
<span id="4829">4829</span>
<span id="4830">4830</span>
<span id="4831">4831</span>
<span id="4832">4832</span>
<span id="4833">4833</span>
<span id="4834">4834</span>
<span id="4835">4835</span>
<span id="4836">4836</span>
<span id="4837">4837</span>
<span id="4838">4838</span>
<span id="4839">4839</span>
<span id="4840">4840</span>
<span id="4841">4841</span>
<span id="4842">4842</span>
<span id="4843">4843</span>
<span id="4844">4844</span>
<span id="4845">4845</span>
<span id="4846">4846</span>
<span id="4847">4847</span>
<span id="4848">4848</span>
<span id="4849">4849</span>
<span id="4850">4850</span>
<span id="4851">4851</span>
<span id="4852">4852</span>
<span id="4853">4853</span>
<span id="4854">4854</span>
<span id="4855">4855</span>
<span id="4856">4856</span>
<span id="4857">4857</span>
<span id="4858">4858</span>
<span id="4859">4859</span>
<span id="4860">4860</span>
<span id="4861">4861</span>
<span id="4862">4862</span>
<span id="4863">4863</span>
<span id="4864">4864</span>
<span id="4865">4865</span>
<span id="4866">4866</span>
<span id="4867">4867</span>
<span id="4868">4868</span>
<span id="4869">4869</span>
<span id="4870">4870</span>
<span id="4871">4871</span>
<span id="4872">4872</span>
<span id="4873">4873</span>
<span id="4874">4874</span>
<span id="4875">4875</span>
<span id="4876">4876</span>
<span id="4877">4877</span>
<span id="4878">4878</span>
<span id="4879">4879</span>
<span id="4880">4880</span>
<span id="4881">4881</span>
<span id="4882">4882</span>
<span id="4883">4883</span>
<span id="4884">4884</span>
<span id="4885">4885</span>
<span id="4886">4886</span>
<span id="4887">4887</span>
<span id="4888">4888</span>
<span id="4889">4889</span>
<span id="4890">4890</span>
<span id="4891">4891</span>
<span id="4892">4892</span>
<span id="4893">4893</span>
<span id="4894">4894</span>
<span id="4895">4895</span>
<span id="4896">4896</span>
<span id="4897">4897</span>
<span id="4898">4898</span>
<span id="4899">4899</span>
<span id="4900">4900</span>
<span id="4901">4901</span>
<span id="4902">4902</span>
<span id="4903">4903</span>
<span id="4904">4904</span>
<span id="4905">4905</span>
<span id="4906">4906</span>
<span id="4907">4907</span>
<span id="4908">4908</span>
<span id="4909">4909</span>
<span id="4910">4910</span>
<span id="4911">4911</span>
<span id="4912">4912</span>
<span id="4913">4913</span>
<span id="4914">4914</span>
<span id="4915">4915</span>
<span id="4916">4916</span>
<span id="4917">4917</span>
<span id="4918">4918</span>
<span id="4919">4919</span>
<span id="4920">4920</span>
<span id="4921">4921</span>
<span id="4922">4922</span>
<span id="4923">4923</span>
<span id="4924">4924</span>
<span id="4925">4925</span>
<span id="4926">4926</span>
<span id="4927">4927</span>
<span id="4928">4928</span>
<span id="4929">4929</span>
<span id="4930">4930</span>
<span id="4931">4931</span>
<span id="4932">4932</span>
<span id="4933">4933</span>
<span id="4934">4934</span>
<span id="4935">4935</span>
<span id="4936">4936</span>
<span id="4937">4937</span>
<span id="4938">4938</span>
<span id="4939">4939</span>
<span id="4940">4940</span>
<span id="4941">4941</span>
<span id="4942">4942</span>
<span id="4943">4943</span>
<span id="4944">4944</span>
<span id="4945">4945</span>
<span id="4946">4946</span>
<span id="4947">4947</span>
<span id="4948">4948</span>
<span id="4949">4949</span>
<span id="4950">4950</span>
<span id="4951">4951</span>
<span id="4952">4952</span>
<span id="4953">4953</span>
<span id="4954">4954</span>
<span id="4955">4955</span>
<span id="4956">4956</span>
<span id="4957">4957</span>
<span id="4958">4958</span>
<span id="4959">4959</span>
<span id="4960">4960</span>
<span id="4961">4961</span>
<span id="4962">4962</span>
<span id="4963">4963</span>
<span id="4964">4964</span>
<span id="4965">4965</span>
<span id="4966">4966</span>
<span id="4967">4967</span>
<span id="4968">4968</span>
<span id="4969">4969</span>
<span id="4970">4970</span>
<span id="4971">4971</span>
<span id="4972">4972</span>
<span id="4973">4973</span>
<span id="4974">4974</span>
<span id="4975">4975</span>
<span id="4976">4976</span>
<span id="4977">4977</span>
<span id="4978">4978</span>
<span id="4979">4979</span>
<span id="4980">4980</span>
<span id="4981">4981</span>
<span id="4982">4982</span>
<span id="4983">4983</span>
<span id="4984">4984</span>
<span id="4985">4985</span>
<span id="4986">4986</span>
<span id="4987">4987</span>
<span id="4988">4988</span>
<span id="4989">4989</span>
<span id="4990">4990</span>
<span id="4991">4991</span>
<span id="4992">4992</span>
<span id="4993">4993</span>
<span id="4994">4994</span>
<span id="4995">4995</span>
<span id="4996">4996</span>
<span id="4997">4997</span>
<span id="4998">4998</span>
<span id="4999">4999</span>
<span id="5000">5000</span>
<span id="5001">5001</span>
<span id="5002">5002</span>
<span id="5003">5003</span>
<span id="5004">5004</span>
<span id="5005">5005</span>
<span id="5006">5006</span>
<span id="5007">5007</span>
<span id="5008">5008</span>
<span id="5009">5009</span>
<span id="5010">5010</span>
<span id="5011">5011</span>
<span id="5012">5012</span>
<span id="5013">5013</span>
<span id="5014">5014</span>
<span id="5015">5015</span>
<span id="5016">5016</span>
<span id="5017">5017</span>
<span id="5018">5018</span>
<span id="5019">5019</span>
<span id="5020">5020</span>
<span id="5021">5021</span>
<span id="5022">5022</span>
<span id="5023">5023</span>
<span id="5024">5024</span>
<span id="5025">5025</span>
<span id="5026">5026</span>
<span id="5027">5027</span>
<span id="5028">5028</span>
<span id="5029">5029</span>
<span id="5030">5030</span>
<span id="5031">5031</span>
<span id="5032">5032</span>
<span id="5033">5033</span>
<span id="5034">5034</span>
<span id="5035">5035</span>
<span id="5036">5036</span>
<span id="5037">5037</span>
<span id="5038">5038</span>
<span id="5039">5039</span>
<span id="5040">5040</span>
<span id="5041">5041</span>
<span id="5042">5042</span>
<span id="5043">5043</span>
<span id="5044">5044</span>
<span id="5045">5045</span>
<span id="5046">5046</span>
<span id="5047">5047</span>
<span id="5048">5048</span>
<span id="5049">5049</span>
<span id="5050">5050</span>
<span id="5051">5051</span>
<span id="5052">5052</span>
<span id="5053">5053</span>
<span id="5054">5054</span>
<span id="5055">5055</span>
<span id="5056">5056</span>
<span id="5057">5057</span>
<span id="5058">5058</span>
<span id="5059">5059</span>
<span id="5060">5060</span>
<span id="5061">5061</span>
<span id="5062">5062</span>
<span id="5063">5063</span>
<span id="5064">5064</span>
<span id="5065">5065</span>
<span id="5066">5066</span>
<span id="5067">5067</span>
<span id="5068">5068</span>
<span id="5069">5069</span>
<span id="5070">5070</span>
<span id="5071">5071</span>
<span id="5072">5072</span>
<span id="5073">5073</span>
<span id="5074">5074</span>
<span id="5075">5075</span>
<span id="5076">5076</span>
<span id="5077">5077</span>
<span id="5078">5078</span>
<span id="5079">5079</span>
<span id="5080">5080</span>
<span id="5081">5081</span>
<span id="5082">5082</span>
<span id="5083">5083</span>
<span id="5084">5084</span>
<span id="5085">5085</span>
<span id="5086">5086</span>
<span id="5087">5087</span>
<span id="5088">5088</span>
<span id="5089">5089</span>
<span id="5090">5090</span>
<span id="5091">5091</span>
<span id="5092">5092</span>
<span id="5093">5093</span>
<span id="5094">5094</span>
<span id="5095">5095</span>
<span id="5096">5096</span>
<span id="5097">5097</span>
<span id="5098">5098</span>
<span id="5099">5099</span>
<span id="5100">5100</span>
<span id="5101">5101</span>
<span id="5102">5102</span>
<span id="5103">5103</span>
<span id="5104">5104</span>
<span id="5105">5105</span>
<span id="5106">5106</span>
<span id="5107">5107</span>
<span id="5108">5108</span>
<span id="5109">5109</span>
<span id="5110">5110</span>
<span id="5111">5111</span>
<span id="5112">5112</span>
<span id="5113">5113</span>
<span id="5114">5114</span>
<span id="5115">5115</span>
<span id="5116">5116</span>
<span id="5117">5117</span>
<span id="5118">5118</span>
<span id="5119">5119</span>
<span id="5120">5120</span>
<span id="5121">5121</span>
<span id="5122">5122</span>
<span id="5123">5123</span>
<span id="5124">5124</span>
<span id="5125">5125</span>
<span id="5126">5126</span>
<span id="5127">5127</span>
<span id="5128">5128</span>
<span id="5129">5129</span>
<span id="5130">5130</span>
<span id="5131">5131</span>
<span id="5132">5132</span>
<span id="5133">5133</span>
<span id="5134">5134</span>
<span id="5135">5135</span>
<span id="5136">5136</span>
<span id="5137">5137</span>
<span id="5138">5138</span>
<span id="5139">5139</span>
<span id="5140">5140</span>
<span id="5141">5141</span>
<span id="5142">5142</span>
<span id="5143">5143</span>
<span id="5144">5144</span>
<span id="5145">5145</span>
<span id="5146">5146</span>
<span id="5147">5147</span>
<span id="5148">5148</span>
<span id="5149">5149</span>
<span id="5150">5150</span>
<span id="5151">5151</span>
<span id="5152">5152</span>
<span id="5153">5153</span>
<span id="5154">5154</span>
<span id="5155">5155</span>
<span id="5156">5156</span>
<span id="5157">5157</span>
<span id="5158">5158</span>
<span id="5159">5159</span>
<span id="5160">5160</span>
<span id="5161">5161</span>
<span id="5162">5162</span>
<span id="5163">5163</span>
<span id="5164">5164</span>
<span id="5165">5165</span>
<span id="5166">5166</span>
<span id="5167">5167</span>
<span id="5168">5168</span>
<span id="5169">5169</span>
<span id="5170">5170</span>
<span id="5171">5171</span>
<span id="5172">5172</span>
<span id="5173">5173</span>
<span id="5174">5174</span>
<span id="5175">5175</span>
<span id="5176">5176</span>
<span id="5177">5177</span>
<span id="5178">5178</span>
<span id="5179">5179</span>
<span id="5180">5180</span>
<span id="5181">5181</span>
<span id="5182">5182</span>
<span id="5183">5183</span>
<span id="5184">5184</span>
<span id="5185">5185</span>
<span id="5186">5186</span>
<span id="5187">5187</span>
<span id="5188">5188</span>
<span id="5189">5189</span>
<span id="5190">5190</span>
<span id="5191">5191</span>
<span id="5192">5192</span>
<span id="5193">5193</span>
<span id="5194">5194</span>
<span id="5195">5195</span>
<span id="5196">5196</span>
<span id="5197">5197</span>
<span id="5198">5198</span>
<span id="5199">5199</span>
<span id="5200">5200</span>
<span id="5201">5201</span>
<span id="5202">5202</span>
<span id="5203">5203</span>
<span id="5204">5204</span>
<span id="5205">5205</span>
<span id="5206">5206</span>
<span id="5207">5207</span>
<span id="5208">5208</span>
<span id="5209">5209</span>
<span id="5210">5210</span>
<span id="5211">5211</span>
<span id="5212">5212</span>
<span id="5213">5213</span>
<span id="5214">5214</span>
<span id="5215">5215</span>
<span id="5216">5216</span>
<span id="5217">5217</span>
<span id="5218">5218</span>
<span id="5219">5219</span>
<span id="5220">5220</span>
<span id="5221">5221</span>
<span id="5222">5222</span>
<span id="5223">5223</span>
<span id="5224">5224</span>
<span id="5225">5225</span>
<span id="5226">5226</span>
<span id="5227">5227</span>
<span id="5228">5228</span>
<span id="5229">5229</span>
<span id="5230">5230</span>
<span id="5231">5231</span>
<span id="5232">5232</span>
<span id="5233">5233</span>
<span id="5234">5234</span>
<span id="5235">5235</span>
<span id="5236">5236</span>
<span id="5237">5237</span>
<span id="5238">5238</span>
<span id="5239">5239</span>
<span id="5240">5240</span>
<span id="5241">5241</span>
<span id="5242">5242</span>
<span id="5243">5243</span>
<span id="5244">5244</span>
<span id="5245">5245</span>
<span id="5246">5246</span>
<span id="5247">5247</span>
<span id="5248">5248</span>
<span id="5249">5249</span>
<span id="5250">5250</span>
<span id="5251">5251</span>
<span id="5252">5252</span>
<span id="5253">5253</span>
<span id="5254">5254</span>
<span id="5255">5255</span>
<span id="5256">5256</span>
<span id="5257">5257</span>
<span id="5258">5258</span>
<span id="5259">5259</span>
<span id="5260">5260</span>
<span id="5261">5261</span>
<span id="5262">5262</span>
<span id="5263">5263</span>
<span id="5264">5264</span>
<span id="5265">5265</span>
<span id="5266">5266</span>
<span id="5267">5267</span>
<span id="5268">5268</span>
<span id="5269">5269</span>
<span id="5270">5270</span>
<span id="5271">5271</span>
<span id="5272">5272</span>
<span id="5273">5273</span>
<span id="5274">5274</span>
<span id="5275">5275</span>
<span id="5276">5276</span>
<span id="5277">5277</span>
<span id="5278">5278</span>
<span id="5279">5279</span>
<span id="5280">5280</span>
<span id="5281">5281</span>
<span id="5282">5282</span>
<span id="5283">5283</span>
<span id="5284">5284</span>
<span id="5285">5285</span>
<span id="5286">5286</span>
<span id="5287">5287</span>
<span id="5288">5288</span>
<span id="5289">5289</span>
<span id="5290">5290</span>
<span id="5291">5291</span>
<span id="5292">5292</span>
<span id="5293">5293</span>
<span id="5294">5294</span>
<span id="5295">5295</span>
<span id="5296">5296</span>
<span id="5297">5297</span>
<span id="5298">5298</span>
<span id="5299">5299</span>
<span id="5300">5300</span>
<span id="5301">5301</span>
<span id="5302">5302</span>
<span id="5303">5303</span>
<span id="5304">5304</span>
<span id="5305">5305</span>
<span id="5306">5306</span>
<span id="5307">5307</span>
<span id="5308">5308</span>
<span id="5309">5309</span>
<span id="5310">5310</span>
<span id="5311">5311</span>
<span id="5312">5312</span>
<span id="5313">5313</span>
<span id="5314">5314</span>
<span id="5315">5315</span>
<span id="5316">5316</span>
<span id="5317">5317</span>
<span id="5318">5318</span>
<span id="5319">5319</span>
<span id="5320">5320</span>
<span id="5321">5321</span>
<span id="5322">5322</span>
<span id="5323">5323</span>
<span id="5324">5324</span>
<span id="5325">5325</span>
<span id="5326">5326</span>
<span id="5327">5327</span>
<span id="5328">5328</span>
<span id="5329">5329</span>
<span id="5330">5330</span>
<span id="5331">5331</span>
<span id="5332">5332</span>
<span id="5333">5333</span>
<span id="5334">5334</span>
<span id="5335">5335</span>
<span id="5336">5336</span>
<span id="5337">5337</span>
<span id="5338">5338</span>
<span id="5339">5339</span>
<span id="5340">5340</span>
<span id="5341">5341</span>
<span id="5342">5342</span>
<span id="5343">5343</span>
<span id="5344">5344</span>
<span id="5345">5345</span>
<span id="5346">5346</span>
<span id="5347">5347</span>
<span id="5348">5348</span>
<span id="5349">5349</span>
<span id="5350">5350</span>
<span id="5351">5351</span>
<span id="5352">5352</span>
<span id="5353">5353</span>
<span id="5354">5354</span>
<span id="5355">5355</span>
<span id="5356">5356</span>
<span id="5357">5357</span>
<span id="5358">5358</span>
<span id="5359">5359</span>
<span id="5360">5360</span>
<span id="5361">5361</span>
<span id="5362">5362</span>
<span id="5363">5363</span>
<span id="5364">5364</span>
<span id="5365">5365</span>
<span id="5366">5366</span>
<span id="5367">5367</span>
<span id="5368">5368</span>
<span id="5369">5369</span>
<span id="5370">5370</span>
<span id="5371">5371</span>
<span id="5372">5372</span>
<span id="5373">5373</span>
<span id="5374">5374</span>
<span id="5375">5375</span>
<span id="5376">5376</span>
<span id="5377">5377</span>
<span id="5378">5378</span>
<span id="5379">5379</span>
<span id="5380">5380</span>
<span id="5381">5381</span>
<span id="5382">5382</span>
<span id="5383">5383</span>
<span id="5384">5384</span>
<span id="5385">5385</span>
<span id="5386">5386</span>
<span id="5387">5387</span>
<span id="5388">5388</span>
<span id="5389">5389</span>
<span id="5390">5390</span>
<span id="5391">5391</span>
<span id="5392">5392</span>
<span id="5393">5393</span>
<span id="5394">5394</span>
<span id="5395">5395</span>
<span id="5396">5396</span>
<span id="5397">5397</span>
<span id="5398">5398</span>
<span id="5399">5399</span>
<span id="5400">5400</span>
<span id="5401">5401</span>
<span id="5402">5402</span>
<span id="5403">5403</span>
<span id="5404">5404</span>
<span id="5405">5405</span>
<span id="5406">5406</span>
<span id="5407">5407</span>
<span id="5408">5408</span>
<span id="5409">5409</span>
<span id="5410">5410</span>
<span id="5411">5411</span>
<span id="5412">5412</span>
<span id="5413">5413</span>
<span id="5414">5414</span>
<span id="5415">5415</span>
<span id="5416">5416</span>
<span id="5417">5417</span>
<span id="5418">5418</span>
<span id="5419">5419</span>
<span id="5420">5420</span>
<span id="5421">5421</span>
<span id="5422">5422</span>
<span id="5423">5423</span>
<span id="5424">5424</span>
<span id="5425">5425</span>
<span id="5426">5426</span>
<span id="5427">5427</span>
<span id="5428">5428</span>
<span id="5429">5429</span>
<span id="5430">5430</span>
<span id="5431">5431</span>
<span id="5432">5432</span>
<span id="5433">5433</span>
<span id="5434">5434</span>
<span id="5435">5435</span>
<span id="5436">5436</span>
<span id="5437">5437</span>
<span id="5438">5438</span>
<span id="5439">5439</span>
<span id="5440">5440</span>
<span id="5441">5441</span>
<span id="5442">5442</span>
<span id="5443">5443</span>
<span id="5444">5444</span>
<span id="5445">5445</span>
<span id="5446">5446</span>
<span id="5447">5447</span>
<span id="5448">5448</span>
<span id="5449">5449</span>
<span id="5450">5450</span>
<span id="5451">5451</span>
<span id="5452">5452</span>
<span id="5453">5453</span>
<span id="5454">5454</span>
<span id="5455">5455</span>
<span id="5456">5456</span>
<span id="5457">5457</span>
<span id="5458">5458</span>
<span id="5459">5459</span>
<span id="5460">5460</span>
<span id="5461">5461</span>
<span id="5462">5462</span>
<span id="5463">5463</span>
<span id="5464">5464</span>
<span id="5465">5465</span>
<span id="5466">5466</span>
<span id="5467">5467</span>
<span id="5468">5468</span>
<span id="5469">5469</span>
<span id="5470">5470</span>
<span id="5471">5471</span>
<span id="5472">5472</span>
<span id="5473">5473</span>
<span id="5474">5474</span>
<span id="5475">5475</span>
<span id="5476">5476</span>
<span id="5477">5477</span>
<span id="5478">5478</span>
<span id="5479">5479</span>
<span id="5480">5480</span>
<span id="5481">5481</span>
<span id="5482">5482</span>
<span id="5483">5483</span>
<span id="5484">5484</span>
<span id="5485">5485</span>
<span id="5486">5486</span>
<span id="5487">5487</span>
<span id="5488">5488</span>
<span id="5489">5489</span>
<span id="5490">5490</span>
<span id="5491">5491</span>
<span id="5492">5492</span>
<span id="5493">5493</span>
<span id="5494">5494</span>
<span id="5495">5495</span>
<span id="5496">5496</span>
<span id="5497">5497</span>
<span id="5498">5498</span>
<span id="5499">5499</span>
<span id="5500">5500</span>
<span id="5501">5501</span>
<span id="5502">5502</span>
<span id="5503">5503</span>
<span id="5504">5504</span>
<span id="5505">5505</span>
<span id="5506">5506</span>
<span id="5507">5507</span>
<span id="5508">5508</span>
<span id="5509">5509</span>
<span id="5510">5510</span>
<span id="5511">5511</span>
<span id="5512">5512</span>
<span id="5513">5513</span>
<span id="5514">5514</span>
<span id="5515">5515</span>
<span id="5516">5516</span>
<span id="5517">5517</span>
<span id="5518">5518</span>
<span id="5519">5519</span>
<span id="5520">5520</span>
<span id="5521">5521</span>
<span id="5522">5522</span>
<span id="5523">5523</span>
<span id="5524">5524</span>
<span id="5525">5525</span>
<span id="5526">5526</span>
<span id="5527">5527</span>
<span id="5528">5528</span>
<span id="5529">5529</span>
<span id="5530">5530</span>
<span id="5531">5531</span>
<span id="5532">5532</span>
<span id="5533">5533</span>
<span id="5534">5534</span>
<span id="5535">5535</span>
<span id="5536">5536</span>
<span id="5537">5537</span>
<span id="5538">5538</span>
<span id="5539">5539</span>
<span id="5540">5540</span>
<span id="5541">5541</span>
<span id="5542">5542</span>
<span id="5543">5543</span>
<span id="5544">5544</span>
<span id="5545">5545</span>
<span id="5546">5546</span>
<span id="5547">5547</span>
<span id="5548">5548</span>
<span id="5549">5549</span>
<span id="5550">5550</span>
<span id="5551">5551</span>
<span id="5552">5552</span>
<span id="5553">5553</span>
<span id="5554">5554</span>
<span id="5555">5555</span>
<span id="5556">5556</span>
<span id="5557">5557</span>
<span id="5558">5558</span>
<span id="5559">5559</span>
<span id="5560">5560</span>
<span id="5561">5561</span>
<span id="5562">5562</span>
<span id="5563">5563</span>
<span id="5564">5564</span>
<span id="5565">5565</span>
<span id="5566">5566</span>
<span id="5567">5567</span>
<span id="5568">5568</span>
<span id="5569">5569</span>
<span id="5570">5570</span>
<span id="5571">5571</span>
<span id="5572">5572</span>
<span id="5573">5573</span>
<span id="5574">5574</span>
<span id="5575">5575</span>
<span id="5576">5576</span>
<span id="5577">5577</span>
<span id="5578">5578</span>
<span id="5579">5579</span>
<span id="5580">5580</span>
<span id="5581">5581</span>
<span id="5582">5582</span>
<span id="5583">5583</span>
<span id="5584">5584</span>
<span id="5585">5585</span>
<span id="5586">5586</span>
<span id="5587">5587</span>
<span id="5588">5588</span>
<span id="5589">5589</span>
<span id="5590">5590</span>
<span id="5591">5591</span>
<span id="5592">5592</span>
<span id="5593">5593</span>
<span id="5594">5594</span>
<span id="5595">5595</span>
<span id="5596">5596</span>
<span id="5597">5597</span>
<span id="5598">5598</span>
<span id="5599">5599</span>
<span id="5600">5600</span>
<span id="5601">5601</span>
<span id="5602">5602</span>
<span id="5603">5603</span>
<span id="5604">5604</span>
<span id="5605">5605</span>
<span id="5606">5606</span>
<span id="5607">5607</span>
<span id="5608">5608</span>
<span id="5609">5609</span>
<span id="5610">5610</span>
<span id="5611">5611</span>
<span id="5612">5612</span>
<span id="5613">5613</span>
<span id="5614">5614</span>
<span id="5615">5615</span>
<span id="5616">5616</span>
<span id="5617">5617</span>
<span id="5618">5618</span>
<span id="5619">5619</span>
<span id="5620">5620</span>
<span id="5621">5621</span>
<span id="5622">5622</span>
<span id="5623">5623</span>
<span id="5624">5624</span>
<span id="5625">5625</span>
<span id="5626">5626</span>
<span id="5627">5627</span>
<span id="5628">5628</span>
<span id="5629">5629</span>
<span id="5630">5630</span>
<span id="5631">5631</span>
<span id="5632">5632</span>
<span id="5633">5633</span>
<span id="5634">5634</span>
<span id="5635">5635</span>
<span id="5636">5636</span>
<span id="5637">5637</span>
<span id="5638">5638</span>
<span id="5639">5639</span>
<span id="5640">5640</span>
<span id="5641">5641</span>
<span id="5642">5642</span>
<span id="5643">5643</span>
<span id="5644">5644</span>
<span id="5645">5645</span>
<span id="5646">5646</span>
<span id="5647">5647</span>
<span id="5648">5648</span>
<span id="5649">5649</span>
<span id="5650">5650</span>
<span id="5651">5651</span>
<span id="5652">5652</span>
<span id="5653">5653</span>
<span id="5654">5654</span>
<span id="5655">5655</span>
<span id="5656">5656</span>
<span id="5657">5657</span>
<span id="5658">5658</span>
<span id="5659">5659</span>
<span id="5660">5660</span>
<span id="5661">5661</span>
<span id="5662">5662</span>
<span id="5663">5663</span>
<span id="5664">5664</span>
<span id="5665">5665</span>
<span id="5666">5666</span>
<span id="5667">5667</span>
<span id="5668">5668</span>
<span id="5669">5669</span>
<span id="5670">5670</span>
<span id="5671">5671</span>
<span id="5672">5672</span>
<span id="5673">5673</span>
<span id="5674">5674</span>
<span id="5675">5675</span>
<span id="5676">5676</span>
<span id="5677">5677</span>
<span id="5678">5678</span>
<span id="5679">5679</span>
<span id="5680">5680</span>
<span id="5681">5681</span>
<span id="5682">5682</span>
<span id="5683">5683</span>
<span id="5684">5684</span>
<span id="5685">5685</span>
<span id="5686">5686</span>
<span id="5687">5687</span>
<span id="5688">5688</span>
<span id="5689">5689</span>
<span id="5690">5690</span>
<span id="5691">5691</span>
<span id="5692">5692</span>
<span id="5693">5693</span>
<span id="5694">5694</span>
<span id="5695">5695</span>
<span id="5696">5696</span>
<span id="5697">5697</span>
<span id="5698">5698</span>
<span id="5699">5699</span>
<span id="5700">5700</span>
<span id="5701">5701</span>
<span id="5702">5702</span>
<span id="5703">5703</span>
<span id="5704">5704</span>
<span id="5705">5705</span>
<span id="5706">5706</span>
<span id="5707">5707</span>
<span id="5708">5708</span>
<span id="5709">5709</span>
<span id="5710">5710</span>
<span id="5711">5711</span>
<span id="5712">5712</span>
<span id="5713">5713</span>
<span id="5714">5714</span>
<span id="5715">5715</span>
<span id="5716">5716</span>
<span id="5717">5717</span>
<span id="5718">5718</span>
<span id="5719">5719</span>
<span id="5720">5720</span>
<span id="5721">5721</span>
<span id="5722">5722</span>
<span id="5723">5723</span>
<span id="5724">5724</span>
<span id="5725">5725</span>
<span id="5726">5726</span>
<span id="5727">5727</span>
<span id="5728">5728</span>
<span id="5729">5729</span>
<span id="5730">5730</span>
<span id="5731">5731</span>
<span id="5732">5732</span>
<span id="5733">5733</span>
<span id="5734">5734</span>
<span id="5735">5735</span>
<span id="5736">5736</span>
<span id="5737">5737</span>
<span id="5738">5738</span>
<span id="5739">5739</span>
<span id="5740">5740</span>
<span id="5741">5741</span>
<span id="5742">5742</span>
<span id="5743">5743</span>
<span id="5744">5744</span>
<span id="5745">5745</span>
<span id="5746">5746</span>
<span id="5747">5747</span>
<span id="5748">5748</span>
<span id="5749">5749</span>
<span id="5750">5750</span>
<span id="5751">5751</span>
<span id="5752">5752</span>
<span id="5753">5753</span>
<span id="5754">5754</span>
<span id="5755">5755</span>
<span id="5756">5756</span>
<span id="5757">5757</span>
<span id="5758">5758</span>
<span id="5759">5759</span>
<span id="5760">5760</span>
<span id="5761">5761</span>
<span id="5762">5762</span>
<span id="5763">5763</span>
<span id="5764">5764</span>
<span id="5765">5765</span>
<span id="5766">5766</span>
<span id="5767">5767</span>
<span id="5768">5768</span>
<span id="5769">5769</span>
<span id="5770">5770</span>
<span id="5771">5771</span>
<span id="5772">5772</span>
<span id="5773">5773</span>
<span id="5774">5774</span>
<span id="5775">5775</span>
<span id="5776">5776</span>
<span id="5777">5777</span>
<span id="5778">5778</span>
<span id="5779">5779</span>
<span id="5780">5780</span>
<span id="5781">5781</span>
<span id="5782">5782</span>
<span id="5783">5783</span>
<span id="5784">5784</span>
<span id="5785">5785</span>
<span id="5786">5786</span>
<span id="5787">5787</span>
<span id="5788">5788</span>
<span id="5789">5789</span>
<span id="5790">5790</span>
<span id="5791">5791</span>
<span id="5792">5792</span>
<span id="5793">5793</span>
<span id="5794">5794</span>
<span id="5795">5795</span>
<span id="5796">5796</span>
<span id="5797">5797</span>
<span id="5798">5798</span>
<span id="5799">5799</span>
<span id="5800">5800</span>
<span id="5801">5801</span>
<span id="5802">5802</span>
<span id="5803">5803</span>
<span id="5804">5804</span>
<span id="5805">5805</span>
<span id="5806">5806</span>
<span id="5807">5807</span>
<span id="5808">5808</span>
<span id="5809">5809</span>
<span id="5810">5810</span>
<span id="5811">5811</span>
<span id="5812">5812</span>
<span id="5813">5813</span>
<span id="5814">5814</span>
<span id="5815">5815</span>
<span id="5816">5816</span>
<span id="5817">5817</span>
<span id="5818">5818</span>
<span id="5819">5819</span>
<span id="5820">5820</span>
<span id="5821">5821</span>
<span id="5822">5822</span>
<span id="5823">5823</span>
<span id="5824">5824</span>
<span id="5825">5825</span>
<span id="5826">5826</span>
<span id="5827">5827</span>
<span id="5828">5828</span>
<span id="5829">5829</span>
<span id="5830">5830</span>
<span id="5831">5831</span>
<span id="5832">5832</span>
<span id="5833">5833</span>
<span id="5834">5834</span>
<span id="5835">5835</span>
<span id="5836">5836</span>
<span id="5837">5837</span>
<span id="5838">5838</span>
<span id="5839">5839</span>
<span id="5840">5840</span>
<span id="5841">5841</span>
<span id="5842">5842</span>
<span id="5843">5843</span>
<span id="5844">5844</span>
<span id="5845">5845</span>
<span id="5846">5846</span>
<span id="5847">5847</span>
<span id="5848">5848</span>
<span id="5849">5849</span>
<span id="5850">5850</span>
<span id="5851">5851</span>
<span id="5852">5852</span>
<span id="5853">5853</span>
<span id="5854">5854</span>
<span id="5855">5855</span>
<span id="5856">5856</span>
<span id="5857">5857</span>
<span id="5858">5858</span>
<span id="5859">5859</span>
<span id="5860">5860</span>
<span id="5861">5861</span>
<span id="5862">5862</span>
<span id="5863">5863</span>
<span id="5864">5864</span>
<span id="5865">5865</span>
<span id="5866">5866</span>
<span id="5867">5867</span>
<span id="5868">5868</span>
<span id="5869">5869</span>
<span id="5870">5870</span>
<span id="5871">5871</span>
<span id="5872">5872</span>
<span id="5873">5873</span>
<span id="5874">5874</span>
<span id="5875">5875</span>
<span id="5876">5876</span>
<span id="5877">5877</span>
<span id="5878">5878</span>
<span id="5879">5879</span>
<span id="5880">5880</span>
<span id="5881">5881</span>
<span id="5882">5882</span>
<span id="5883">5883</span>
<span id="5884">5884</span>
<span id="5885">5885</span>
<span id="5886">5886</span>
<span id="5887">5887</span>
<span id="5888">5888</span>
<span id="5889">5889</span>
<span id="5890">5890</span>
<span id="5891">5891</span>
<span id="5892">5892</span>
<span id="5893">5893</span>
<span id="5894">5894</span>
<span id="5895">5895</span>
<span id="5896">5896</span>
<span id="5897">5897</span>
<span id="5898">5898</span>
<span id="5899">5899</span>
<span id="5900">5900</span>
<span id="5901">5901</span>
<span id="5902">5902</span>
<span id="5903">5903</span>
<span id="5904">5904</span>
<span id="5905">5905</span>
<span id="5906">5906</span>
<span id="5907">5907</span>
<span id="5908">5908</span>
<span id="5909">5909</span>
<span id="5910">5910</span>
<span id="5911">5911</span>
<span id="5912">5912</span>
<span id="5913">5913</span>
<span id="5914">5914</span>
<span id="5915">5915</span>
<span id="5916">5916</span>
<span id="5917">5917</span>
<span id="5918">5918</span>
<span id="5919">5919</span>
<span id="5920">5920</span>
<span id="5921">5921</span>
<span id="5922">5922</span>
<span id="5923">5923</span>
<span id="5924">5924</span>
<span id="5925">5925</span>
<span id="5926">5926</span>
<span id="5927">5927</span>
<span id="5928">5928</span>
<span id="5929">5929</span>
<span id="5930">5930</span>
<span id="5931">5931</span>
<span id="5932">5932</span>
<span id="5933">5933</span>
<span id="5934">5934</span>
<span id="5935">5935</span>
<span id="5936">5936</span>
<span id="5937">5937</span>
<span id="5938">5938</span>
<span id="5939">5939</span>
<span id="5940">5940</span>
<span id="5941">5941</span>
<span id="5942">5942</span>
<span id="5943">5943</span>
<span id="5944">5944</span>
<span id="5945">5945</span>
<span id="5946">5946</span>
<span id="5947">5947</span>
<span id="5948">5948</span>
<span id="5949">5949</span>
<span id="5950">5950</span>
<span id="5951">5951</span>
<span id="5952">5952</span>
<span id="5953">5953</span>
<span id="5954">5954</span>
<span id="5955">5955</span>
<span id="5956">5956</span>
<span id="5957">5957</span>
<span id="5958">5958</span>
<span id="5959">5959</span>
<span id="5960">5960</span>
<span id="5961">5961</span>
<span id="5962">5962</span>
<span id="5963">5963</span>
<span id="5964">5964</span>
<span id="5965">5965</span>
<span id="5966">5966</span>
<span id="5967">5967</span>
<span id="5968">5968</span>
<span id="5969">5969</span>
<span id="5970">5970</span>
<span id="5971">5971</span>
<span id="5972">5972</span>
<span id="5973">5973</span>
<span id="5974">5974</span>
<span id="5975">5975</span>
<span id="5976">5976</span>
<span id="5977">5977</span>
<span id="5978">5978</span>
<span id="5979">5979</span>
<span id="5980">5980</span>
<span id="5981">5981</span>
<span id="5982">5982</span>
<span id="5983">5983</span>
<span id="5984">5984</span>
<span id="5985">5985</span>
<span id="5986">5986</span>
<span id="5987">5987</span>
<span id="5988">5988</span>
<span id="5989">5989</span>
<span id="5990">5990</span>
<span id="5991">5991</span>
<span id="5992">5992</span>
<span id="5993">5993</span>
<span id="5994">5994</span>
<span id="5995">5995</span>
<span id="5996">5996</span>
<span id="5997">5997</span>
<span id="5998">5998</span>
<span id="5999">5999</span>
<span id="6000">6000</span>
<span id="6001">6001</span>
<span id="6002">6002</span>
<span id="6003">6003</span>
<span id="6004">6004</span>
<span id="6005">6005</span>
<span id="6006">6006</span>
<span id="6007">6007</span>
<span id="6008">6008</span>
<span id="6009">6009</span>
<span id="6010">6010</span>
<span id="6011">6011</span>
<span id="6012">6012</span>
<span id="6013">6013</span>
<span id="6014">6014</span>
<span id="6015">6015</span>
<span id="6016">6016</span>
<span id="6017">6017</span>
<span id="6018">6018</span>
<span id="6019">6019</span>
<span id="6020">6020</span>
<span id="6021">6021</span>
<span id="6022">6022</span>
<span id="6023">6023</span>
<span id="6024">6024</span>
<span id="6025">6025</span>
<span id="6026">6026</span>
<span id="6027">6027</span>
<span id="6028">6028</span>
<span id="6029">6029</span>
<span id="6030">6030</span>
<span id="6031">6031</span>
<span id="6032">6032</span>
<span id="6033">6033</span>
<span id="6034">6034</span>
<span id="6035">6035</span>
<span id="6036">6036</span>
<span id="6037">6037</span>
<span id="6038">6038</span>
<span id="6039">6039</span>
<span id="6040">6040</span>
<span id="6041">6041</span>
<span id="6042">6042</span>
<span id="6043">6043</span>
<span id="6044">6044</span>
<span id="6045">6045</span>
<span id="6046">6046</span>
<span id="6047">6047</span>
<span id="6048">6048</span>
<span id="6049">6049</span>
<span id="6050">6050</span>
<span id="6051">6051</span>
<span id="6052">6052</span>
<span id="6053">6053</span>
<span id="6054">6054</span>
<span id="6055">6055</span>
<span id="6056">6056</span>
<span id="6057">6057</span>
<span id="6058">6058</span>
<span id="6059">6059</span>
<span id="6060">6060</span>
<span id="6061">6061</span>
<span id="6062">6062</span>
<span id="6063">6063</span>
<span id="6064">6064</span>
<span id="6065">6065</span>
<span id="6066">6066</span>
<span id="6067">6067</span>
<span id="6068">6068</span>
<span id="6069">6069</span>
<span id="6070">6070</span>
<span id="6071">6071</span>
<span id="6072">6072</span>
<span id="6073">6073</span>
<span id="6074">6074</span>
<span id="6075">6075</span>
<span id="6076">6076</span>
<span id="6077">6077</span>
<span id="6078">6078</span>
<span id="6079">6079</span>
<span id="6080">6080</span>
<span id="6081">6081</span>
<span id="6082">6082</span>
<span id="6083">6083</span>
<span id="6084">6084</span>
<span id="6085">6085</span>
<span id="6086">6086</span>
<span id="6087">6087</span>
<span id="6088">6088</span>
<span id="6089">6089</span>
<span id="6090">6090</span>
<span id="6091">6091</span>
<span id="6092">6092</span>
<span id="6093">6093</span>
<span id="6094">6094</span>
<span id="6095">6095</span>
<span id="6096">6096</span>
<span id="6097">6097</span>
<span id="6098">6098</span>
<span id="6099">6099</span>
<span id="6100">6100</span>
<span id="6101">6101</span>
<span id="6102">6102</span>
<span id="6103">6103</span>
<span id="6104">6104</span>
<span id="6105">6105</span>
<span id="6106">6106</span>
<span id="6107">6107</span>
<span id="6108">6108</span>
<span id="6109">6109</span>
<span id="6110">6110</span>
<span id="6111">6111</span>
<span id="6112">6112</span>
<span id="6113">6113</span>
<span id="6114">6114</span>
<span id="6115">6115</span>
<span id="6116">6116</span>
<span id="6117">6117</span>
<span id="6118">6118</span>
<span id="6119">6119</span>
<span id="6120">6120</span>
<span id="6121">6121</span>
<span id="6122">6122</span>
<span id="6123">6123</span>
<span id="6124">6124</span>
<span id="6125">6125</span>
<span id="6126">6126</span>
<span id="6127">6127</span>
<span id="6128">6128</span>
<span id="6129">6129</span>
<span id="6130">6130</span>
<span id="6131">6131</span>
<span id="6132">6132</span>
<span id="6133">6133</span>
</pre><pre class="rust"><code><span class="comment">// Copyright Mozilla Foundation. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 &lt;LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0&gt; or the MIT license
// &lt;LICENSE-MIT or https://opensource.org/licenses/MIT&gt;, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
</span><span class="attribute">#![cfg_attr(
feature = <span class="string">&quot;cargo-clippy&quot;</span>,
allow(doc_markdown, inline_always, new_ret_no_self)
)]
</span><span class="doccomment">//! encoding_rs is a Gecko-oriented Free Software / Open Source implementation
//! of the [Encoding Standard](https://encoding.spec.whatwg.org/) in Rust.
//! Gecko-oriented means that converting to and from UTF-16 is supported in
//! addition to converting to and from UTF-8, that the performance and
//! streamability goals are browser-oriented, and that FFI-friendliness is a
//! goal.
//!
//! Additionally, the `mem` module provides functions that are useful for
//! applications that need to be able to deal with legacy in-memory
//! representations of Unicode.
//!
//! For expectation setting, please be sure to read the sections
//! [_UTF-16LE, UTF-16BE and Unicode Encoding Schemes_](#utf-16le-utf-16be-and-unicode-encoding-schemes),
//! [_ISO-8859-1_](#iso-8859-1) and [_Web / Browser Focus_](#web--browser-focus) below.
//!
//! There is a [long-form write-up](https://hsivonen.fi/encoding_rs/) about the
//! design and internals of the crate.
//!
//! # Availability
//!
//! The code is available under the
//! [Apache license, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
//! or the [MIT license](https://opensource.org/licenses/MIT), at your option.
//! See the
//! [`COPYRIGHT`](https://github.com/hsivonen/encoding_rs/blob/master/COPYRIGHT)
//! file for details.
//! The [repository is on GitHub](https://github.com/hsivonen/encoding_rs). The
//! [crate is available on crates.io](https://crates.io/crates/encoding_rs).
//!
//! # Integration with `std::io`
//!
//! This crate doesn&#39;t implement traits from `std::io`. However, for the case of
//! wrapping a `std::io::Read` in a decoder that implements `std::io::Read` and
//! presents the data from the wrapped `std::io::Read` as UTF-8 is addressed by
//! the [`encoding_rs_io`](https://docs.rs/encoding_rs_io/) crate.
//!
//! # Examples
//!
//! Example programs:
//!
//! * [Rust](https://github.com/hsivonen/recode_rs)
//! * [C](https://github.com/hsivonen/recode_c)
//! * [C++](https://github.com/hsivonen/recode_cpp)
//!
//! Decode using the non-streaming API:
//!
//! ```
//! #[cfg(feature = &quot;alloc&quot;)] {
//! use encoding_rs::*;
//!
//! let expectation = &quot;\u{30CF}\u{30ED}\u{30FC}\u{30FB}\u{30EF}\u{30FC}\u{30EB}\u{30C9}&quot;;
//! let bytes = b&quot;\x83n\x83\x8D\x81[\x81E\x83\x8F\x81[\x83\x8B\x83h&quot;;
//!
//! let (cow, encoding_used, had_errors) = SHIFT_JIS.decode(bytes);
//! assert_eq!(&amp;cow[..], expectation);
//! assert_eq!(encoding_used, SHIFT_JIS);
//! assert!(!had_errors);
//! }
//! ```
//!
//! Decode using the streaming API with minimal `unsafe`:
//!
//! ```
//! use encoding_rs::*;
//!
//! let expectation = &quot;\u{30CF}\u{30ED}\u{30FC}\u{30FB}\u{30EF}\u{30FC}\u{30EB}\u{30C9}&quot;;
//!
//! // Use an array of byte slices to demonstrate content arriving piece by
//! // piece from the network.
//! let bytes: [&amp;&#39;static [u8]; 4] = [b&quot;\x83&quot;,
//! b&quot;n\x83\x8D\x81&quot;,
//! b&quot;[\x81E\x83\x8F\x81[\x83&quot;,
//! b&quot;\x8B\x83h&quot;];
//!
//! // Very short output buffer to demonstrate the output buffer getting full.
//! // Normally, you&#39;d use something like `[0u8; 2048]`.
//! let mut buffer_bytes = [0u8; 8];
//! let mut buffer: &amp;mut str = std::str::from_utf8_mut(&amp;mut buffer_bytes[..]).unwrap();
//!
//! // How many bytes in the buffer currently hold significant data.
//! let mut bytes_in_buffer = 0usize;
//!
//! // Collect the output to a string for demonstration purposes.
//! let mut output = String::new();
//!
//! // The `Decoder`
//! let mut decoder = SHIFT_JIS.new_decoder();
//!
//! // Track whether we see errors.
//! let mut total_had_errors = false;
//!
//! // Decode using a fixed-size intermediate buffer (for demonstrating the
//! // use of a fixed-size buffer; normally when the output of an incremental
//! // decode goes to a `String` one would use `Decoder.decode_to_string()` to
//! // avoid the intermediate buffer).
//! for input in &amp;bytes[..] {
//! // The number of bytes already read from current `input` in total.
//! let mut total_read_from_current_input = 0usize;
//!
//! loop {
//! let (result, read, written, had_errors) =
//! decoder.decode_to_str(&amp;input[total_read_from_current_input..],
//! &amp;mut buffer[bytes_in_buffer..],
//! false);
//! total_read_from_current_input += read;
//! bytes_in_buffer += written;
//! total_had_errors |= had_errors;
//! match result {
//! CoderResult::InputEmpty =&gt; {
//! // We have consumed the current input buffer. Break out of
//! // the inner loop to get the next input buffer from the
//! // outer loop.
//! break;
//! },
//! CoderResult::OutputFull =&gt; {
//! // Write the current buffer out and consider the buffer
//! // empty.
//! output.push_str(&amp;buffer[..bytes_in_buffer]);
//! bytes_in_buffer = 0usize;
//! continue;
//! }
//! }
//! }
//! }
//!
//! // Process EOF
//! loop {
//! let (result, _, written, had_errors) =
//! decoder.decode_to_str(b&quot;&quot;,
//! &amp;mut buffer[bytes_in_buffer..],
//! true);
//! bytes_in_buffer += written;
//! total_had_errors |= had_errors;
//! // Write the current buffer out and consider the buffer empty.
//! // Need to do this here for both `match` arms, because we exit the
//! // loop on `CoderResult::InputEmpty`.
//! output.push_str(&amp;buffer[..bytes_in_buffer]);
//! bytes_in_buffer = 0usize;
//! match result {
//! CoderResult::InputEmpty =&gt; {
//! // Done!
//! break;
//! },
//! CoderResult::OutputFull =&gt; {
//! continue;
//! }
//! }
//! }
//!
//! assert_eq!(&amp;output[..], expectation);
//! assert!(!total_had_errors);
//! ```
//!
//! ## UTF-16LE, UTF-16BE and Unicode Encoding Schemes
//!
//! The Encoding Standard doesn&#39;t specify encoders for UTF-16LE and UTF-16BE,
//! __so this crate does not provide encoders for those encodings__!
//! Along with the replacement encoding, their _output encoding_ (i.e. the
//! encoding used for form submission and error handling in the query string
//! of URLs) is UTF-8, so you get an UTF-8 encoder if you request an encoder
//! for them.
//!
//! Additionally, the Encoding Standard factors BOM handling into wrapper
//! algorithms so that BOM handling isn&#39;t part of the definition of the
//! encodings themselves. The Unicode _encoding schemes_ in the Unicode
//! Standard define BOM handling or lack thereof as part of the encoding
//! scheme.
//!
//! When used with the `_without_bom_handling` entry points, the UTF-16LE
//! and UTF-16BE _encodings_ match the same-named _encoding schemes_ from
//! the Unicode Standard.
//!
//! When used with the `_with_bom_removal` entry points, the UTF-8
//! _encoding_ matches the UTF-8 _encoding scheme_ from the Unicode
//! Standard.
//!
//! This crate does not provide a mode that matches the UTF-16 _encoding
//! scheme_ from the Unicode Stardard. The UTF-16BE encoding used with
//! the entry points without `_bom_` qualifiers is the closest match,
//! but in that case, the UTF-8 BOM triggers UTF-8 decoding, which is
//! not part of the behavior of the UTF-16 _encoding scheme_ per the
//! Unicode Standard.
//!
//! The UTF-32 family of Unicode encoding schemes is not supported
//! by this crate. The Encoding Standard doesn&#39;t define any UTF-32
//! family encodings, since they aren&#39;t necessary for consuming Web
//! content.
//!
//! While gb18030 is capable of representing U+FEFF, the Encoding
//! Standard does not treat the gb18030 byte representation of U+FEFF
//! as a BOM, so neither does this crate.
//!
//! ## ISO-8859-1
//!
//! ISO-8859-1 does not exist as a distinct encoding from windows-1252 in
//! the Encoding Standard. Therefore, an encoding that maps the unsigned
//! byte value to the same Unicode scalar value is not available via
//! `Encoding` in this crate.
//!
//! However, the functions whose name starts with `convert` and contains
//! `latin1` in the `mem` module support such conversions, which are known as
//! [_isomorphic decode_](https://infra.spec.whatwg.org/#isomorphic-decode)
//! and [_isomorphic encode_](https://infra.spec.whatwg.org/#isomorphic-encode)
//! in the [Infra Standard](https://infra.spec.whatwg.org/).
//!
//! ## Web / Browser Focus
//!
//! Both in terms of scope and performance, the focus is on the Web. For scope,
//! this means that encoding_rs implements the Encoding Standard fully and
//! doesn&#39;t implement encodings that are not specified in the Encoding
//! Standard. For performance, this means that decoding performance is
//! important as well as performance for encoding into UTF-8 or encoding the
//! Basic Latin range (ASCII) into legacy encodings. Non-Basic Latin needs to
//! be encoded into legacy encodings in only two places in the Web platform: in
//! the query part of URLs, in which case it&#39;s a matter of relatively rare
//! error handling, and in form submission, in which case the user action and
//! networking tend to hide the performance of the encoder.
//!
//! Deemphasizing performance of encoding non-Basic Latin text into legacy
//! encodings enables smaller code size thanks to the encoder side using the
//! decode-optimized data tables without having encode-optimized data tables at
//! all. Even in decoders, smaller lookup table size is preferred over avoiding
//! multiplication operations.
//!
//! Additionally, performance is a non-goal for the ASCII-incompatible
//! ISO-2022-JP encoding, which are rarely used on the Web. Instead of
//! performance, the decoder for ISO-2022-JP optimizes for ease/clarity
//! of implementation.
//!
//! Despite the browser focus, the hope is that non-browser applications
//! that wish to consume Web content or submit Web forms in a Web-compatible
//! way will find encoding_rs useful. While encoding_rs does not try to match
//! Windows behavior, many of the encodings are close enough to legacy
//! encodings implemented by Windows that applications that need to consume
//! data in legacy Windows encodins may find encoding_rs useful. The
//! [codepage](https://crates.io/crates/codepage) crate maps from Windows
//! code page identifiers onto encoding_rs `Encoding`s and vice versa.
//!
//! For decoding email, UTF-7 support is needed (unfortunately) in additition
//! to the encodings defined in the Encoding Standard. The
//! [charset](https://crates.io/crates/charset) wraps encoding_rs and adds
//! UTF-7 decoding for email purposes.
//!
//! For single-byte DOS encodings beyond the ones supported by the Encoding
//! Standard, there is the [`oem_cp`](https://crates.io/crates/oem_cp) crate.
//!
//! # Preparing Text for the Encoders
//!
//! Normalizing text into Unicode Normalization Form C prior to encoding text
//! into a legacy encoding minimizes unmappable characters. Text can be
//! normalized to Unicode Normalization Form C using the
//! [`icu_normalizer`](https://crates.io/crates/icu_normalizer) crate, which
//! is part of [ICU4X](https://icu4x.unicode.org/).
//!
//! The exception is windows-1258, which after normalizing to Unicode
//! Normalization Form C requires tone marks to be decomposed in order to
//! minimize unmappable characters. Vietnamese tone marks can be decomposed
//! using the [`detone`](https://crates.io/crates/detone) crate.
//!
//! # Streaming &amp; Non-Streaming; Rust &amp; C/C++
//!
//! The API in Rust has two modes of operation: streaming and non-streaming.
//! The streaming API is the foundation of the implementation and should be
//! used when processing data that arrives piecemeal from an i/o stream. The
//! streaming API has an FFI wrapper (as a [separate crate][1]) that exposes it
//! to C callers. The non-streaming part of the API is for Rust callers only and
//! is smart about borrowing instead of copying when possible. When
//! streamability is not needed, the non-streaming API should be preferrer in
//! order to avoid copying data when a borrow suffices.
//!
//! There is no analogous C API exposed via FFI, mainly because C doesn&#39;t have
//! standard types for growable byte buffers and Unicode strings that know
//! their length.
//!
//! The C API (header file generated at `target/include/encoding_rs.h` when
//! building encoding_rs) can, in turn, be wrapped for use from C++. Such a
//! C++ wrapper can re-create the non-streaming API in C++ for C++ callers.
//! The C binding comes with a [C++17 wrapper][2] that uses standard library +
//! [GSL][3] types and that recreates the non-streaming API in C++ on top of
//! the streaming API. A C++ wrapper with XPCOM/MFBT types is available as
//! [`mozilla::Encoding`][4].
//!
//! The `Encoding` type is common to both the streaming and non-streaming
//! modes. In the streaming mode, decoding operations are performed with a
//! `Decoder` and encoding operations with an `Encoder` object obtained via
//! `Encoding`. In the non-streaming mode, decoding and encoding operations are
//! performed using methods on `Encoding` objects themselves, so the `Decoder`
//! and `Encoder` objects are not used at all.
//!
//! [1]: https://github.com/hsivonen/encoding_c
//! [2]: https://github.com/hsivonen/encoding_c/blob/master/include/encoding_rs_cpp.h
//! [3]: https://github.com/Microsoft/GSL/
//! [4]: https://searchfox.org/mozilla-central/source/intl/Encoding.h
//!
//! # Memory management
//!
//! The non-streaming mode never performs heap allocations (even the methods
//! that write into a `Vec&lt;u8&gt;` or a `String` by taking them as arguments do
//! not reallocate the backing buffer of the `Vec&lt;u8&gt;` or the `String`). That
//! is, the non-streaming mode uses caller-allocated buffers exclusively.
//!
//! The methods of the streaming mode that return a `Vec&lt;u8&gt;` or a `String`
//! perform heap allocations but only to allocate the backing buffer of the
//! `Vec&lt;u8&gt;` or the `String`.
//!
//! `Encoding` is always statically allocated. `Decoder` and `Encoder` need no
//! `Drop` cleanup.
//!
//! # Buffer reading and writing behavior
//!
//! Based on experience gained with the `java.nio.charset` encoding converter
//! API and with the Gecko uconv encoding converter API, the buffer reading
//! and writing behaviors of encoding_rs are asymmetric: input buffers are
//! fully drained but output buffers are not always fully filled.
//!
//! When reading from an input buffer, encoding_rs always consumes all input
//! up to the next error or to the end of the buffer. In particular, when
//! decoding, even if the input buffer ends in the middle of a byte sequence
//! for a character, the decoder consumes all input. This has the benefit that
//! the caller of the API can always fill the next buffer from the start from
//! whatever source the bytes come from and never has to first copy the last
//! bytes of the previous buffer to the start of the next buffer. However, when
//! encoding, the UTF-8 input buffers have to end at a character boundary, which
//! is a requirement for the Rust `str` type anyway, and UTF-16 input buffer
//! boundaries falling in the middle of a surrogate pair result in both
//! suggorates being treated individually as unpaired surrogates.
//!
//! Additionally, decoders guarantee that they can be fed even one byte at a
//! time and encoders guarantee that they can be fed even one code point at a
//! time. This has the benefit of not placing restrictions on the size of
//! chunks the content arrives e.g. from network.
//!
//! When writing into an output buffer, encoding_rs makes sure that the code
//! unit sequence for a character is never split across output buffer
//! boundaries. This may result in wasted space at the end of an output buffer,
//! but the advantages are that the output side of both decoders and encoders
//! is greatly simplified compared to designs that attempt to fill output
//! buffers exactly even when that entails splitting a code unit sequence and
//! when encoding_rs methods return to the caller, the output produces thus
//! far is always valid taken as whole. (In the case of encoding to ISO-2022-JP,
//! the output needs to be considered as a whole, because the latest output
//! buffer taken alone might not be valid taken alone if the transition away
//! from the ASCII state occurred in an earlier output buffer. However, since
//! the ISO-2022-JP decoder doesn&#39;t treat streams that don&#39;t end in the ASCII
//! state as being in error despite the encoder generating a transition to the
//! ASCII state at the end, the claim about the partial output taken as a whole
//! being valid is true even for ISO-2022-JP.)
//!
//! # Error Reporting
//!
//! Based on experience gained with the `java.nio.charset` encoding converter
//! API and with the Gecko uconv encoding converter API, the error reporting
//! behaviors of encoding_rs are asymmetric: decoder errors include offsets
//! that leave it up to the caller to extract the erroneous bytes from the
//! input stream if the caller wishes to do so but encoder errors provide the
//! code point associated with the error without requiring the caller to
//! extract it from the input on its own.
//!
//! On the encoder side, an error is always triggered by the most recently
//! pushed Unicode scalar, which makes it simple to pass the `char` to the
//! caller. Also, it&#39;s very typical for the caller to wish to do something with
//! this data: generate a numeric escape for the character. Additionally, the
//! ISO-2022-JP encoder reports U+FFFD instead of the actual input character in
//! certain cases, so requiring the caller to extract the character from the
//! input buffer would require the caller to handle ISO-2022-JP details.
//! Furthermore, requiring the caller to extract the character from the input
//! buffer would require the caller to implement UTF-8 or UTF-16 math, which is
//! the job of an encoding conversion library.
//!
//! On the decoder side, errors are triggered in more complex ways. For
//! example, when decoding the sequence ESC, &#39;$&#39;, _buffer boundary_, &#39;A&#39; as
//! ISO-2022-JP, the ESC byte is in error, but this is discovered only after
//! the buffer boundary when processing &#39;A&#39;. Thus, the bytes in error might not
//! be the ones most recently pushed to the decoder and the error might not even
//! be in the current buffer.
//!
//! Some encoding conversion APIs address the problem by not acknowledging
//! trailing bytes of an input buffer as consumed if it&#39;s still possible for
//! future bytes to cause the trailing bytes to be in error. This way, error
//! reporting can always refer to the most recently pushed buffer. This has the
//! problem that the caller of the API has to copy the unconsumed trailing
//! bytes to the start of the next buffer before being able to fill the rest
//! of the next buffer. This is annoying, error-prone and inefficient.
//!
//! A possible solution would be making the decoder remember recently consumed
//! bytes in order to be able to include a copy of the erroneous bytes when
//! reporting an error. This has two problem: First, callers a rarely
//! interested in the erroneous bytes, so attempts to identify them are most
//! often just overhead anyway. Second, the rare applications that are
//! interested typically care about the location of the error in the input
//! stream.
//!
//! To keep the API convenient for common uses and the overhead low while making
//! it possible to develop applications, such as HTML validators, that care
//! about which bytes were in error, encoding_rs reports the length of the
//! erroneous sequence and the number of bytes consumed after the erroneous
//! sequence. As long as the caller doesn&#39;t discard the 6 most recent bytes,
//! this makes it possible for callers that care about the erroneous bytes to
//! locate them.
//!
//! # No Convenience API for Custom Replacements
//!
//! The Web Platform and, therefore, the Encoding Standard supports only one
//! error recovery mode for decoders and only one error recovery mode for
//! encoders. The supported error recovery mode for decoders is emitting the
//! REPLACEMENT CHARACTER on error. The supported error recovery mode for
//! encoders is emitting an HTML decimal numeric character reference for
//! unmappable characters.
//!
//! Since encoding_rs is Web-focused, these are the only error recovery modes
//! for which convenient support is provided. Moreover, on the decoder side,
//! there aren&#39;t really good alternatives for emitting the REPLACEMENT CHARACTER
//! on error (other than treating errors as fatal). In particular, simply
//! ignoring errors is a
//! [security problem](http://www.unicode.org/reports/tr36/#Substituting_for_Ill_Formed_Subsequences),
//! so it would be a bad idea for encoding_rs to provide a mode that encouraged
//! callers to ignore errors.
//!
//! On the encoder side, there are plausible alternatives for HTML decimal
//! numeric character references. For example, when outputting CSS, CSS-style
//! escapes would seem to make sense. However, instead of facilitating the
//! output of CSS, JS, etc. in non-UTF-8 encodings, encoding_rs takes the design
//! position that you shouldn&#39;t generate output in encodings other than UTF-8,
//! except where backward compatibility with interacting with the legacy Web
//! requires it. The legacy Web requires it only when parsing the query strings
//! of URLs and when submitting forms, and those two both use HTML decimal
//! numeric character references.
//!
//! While encoding_rs doesn&#39;t make encoder replacements other than HTML decimal
//! numeric character references easy, it does make them _possible_.
//! `encode_from_utf8()`, which emits HTML decimal numeric character references
//! for unmappable characters, is implemented on top of
//! `encode_from_utf8_without_replacement()`. Applications that really, really
//! want other replacement schemes for unmappable characters can likewise
//! implement them on top of `encode_from_utf8_without_replacement()`.
//!
//! # No Extensibility by Design
//!
//! The set of encodings supported by encoding_rs is not extensible by design.
//! That is, `Encoding`, `Decoder` and `Encoder` are intentionally `struct`s
//! rather than `trait`s. encoding_rs takes the design position that all future
//! text interchange should be done using UTF-8, which can represent all of
//! Unicode. (It is, in fact, the only encoding supported by the Encoding
//! Standard and encoding_rs that can represent all of Unicode and that has
//! encoder support. UTF-16LE and UTF-16BE don&#39;t have encoder support, and
//! gb18030 cannot encode U+E5E5.) The other encodings are supported merely for
//! legacy compatibility and not due to non-UTF-8 encodings having benefits
//! other than being able to consume legacy content.
//!
//! Considering that UTF-8 can represent all of Unicode and is already supported
//! by all Web browsers, introducing a new encoding wouldn&#39;t add to the
//! expressiveness but would add to compatibility problems. In that sense,
//! adding new encodings to the Web Platform doesn&#39;t make sense, and, in fact,
//! post-UTF-8 attempts at encodings, such as BOCU-1, have been rejected from
//! the Web Platform. On the other hand, the set of legacy encodings that must
//! be supported for a Web browser to be able to be successful is not going to
//! expand. Empirically, the set of encodings specified in the Encoding Standard
//! is already sufficient and the set of legacy encodings won&#39;t grow
//! retroactively.
//!
//! Since extensibility doesn&#39;t make sense considering the Web focus of
//! encoding_rs and adding encodings to Web clients would be actively harmful,
//! it makes sense to make the set of encodings that encoding_rs supports
//! non-extensible and to take the (admittedly small) benefits arising from
//! that, such as the size of `Decoder` and `Encoder` objects being known ahead
//! of time, which enables stack allocation thereof.
//!
//! This does have downsides for applications that might want to put encoding_rs
//! to non-Web uses if those non-Web uses involve legacy encodings that aren&#39;t
//! needed for Web uses. The needs of such applications should not complicate
//! encoding_rs itself, though. It is up to those applications to provide a
//! framework that delegates the operations with encodings that encoding_rs
//! supports to encoding_rs and operations with other encodings to something
//! else (as opposed to encoding_rs itself providing an extensibility
//! framework).
//!
//! # Panics
//!
//! Methods in encoding_rs can panic if the API is used against the requirements
//! stated in the documentation, if a state that&#39;s supposed to be impossible
//! is reached due to an internal bug or on integer overflow. When used
//! according to documentation with buffer sizes that stay below integer
//! overflow, in the absence of internal bugs, encoding_rs does not panic.
//!
//! Panics arising from API misuse aren&#39;t documented beyond this on individual
//! methods.
//!
//! # At-Risk Parts of the API
//!
//! The foreseeable source of partially backward-incompatible API change is the
//! way the instances of `Encoding` are made available.
//!
//! If Rust changes to allow the entries of `[&amp;&#39;static Encoding; N]` to be
//! initialized with `static`s of type `&amp;&#39;static Encoding`, the non-reference
//! `FOO_INIT` public `Encoding` instances will be removed from the public API.
//!
//! If Rust changes to make the referent of `pub const FOO: &amp;&#39;static Encoding`
//! unique when the constant is used in different crates, the reference-typed
//! `static`s for the encoding instances will be changed from `static` to
//! `const` and the non-reference-typed `_INIT` instances will be removed.
//!
//! # Mapping Spec Concepts onto the API
//!
//! &lt;table&gt;
//! &lt;thead&gt;
//! &lt;tr&gt;&lt;th&gt;Spec Concept&lt;/th&gt;&lt;th&gt;Streaming&lt;/th&gt;&lt;th&gt;Non-Streaming&lt;/th&gt;&lt;/tr&gt;
//! &lt;/thead&gt;
//! &lt;tbody&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#encoding&quot;&gt;encoding&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;amp;&#39;static Encoding&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;amp;&#39;static Encoding&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#utf-8&quot;&gt;UTF-8 encoding&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;UTF_8&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;UTF_8&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#concept-encoding-get&quot;&gt;get an encoding&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Encoding::for_label(&lt;var&gt;label&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;Encoding::for_label(&lt;var&gt;label&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#name&quot;&gt;name&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.name()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.name()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#get-an-output-encoding&quot;&gt;get an output encoding&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.output_encoding()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.output_encoding()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#decode&quot;&gt;decode&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;let d = &lt;var&gt;encoding&lt;/var&gt;.new_decoder();&lt;br&gt;let res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, false);&lt;br&gt;// &amp;hellip;&lt;/br&gt;let last_res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, true);&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.decode(&lt;var&gt;src&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#utf-8-decode&quot;&gt;UTF-8 decode&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;let d = UTF_8.new_decoder_with_bom_removal();&lt;br&gt;let res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, false);&lt;br&gt;// &amp;hellip;&lt;/br&gt;let last_res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, true);&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;UTF_8.decode_with_bom_removal(&lt;var&gt;src&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#utf-8-decode-without-bom&quot;&gt;UTF-8 decode without BOM&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;let d = UTF_8.new_decoder_without_bom_handling();&lt;br&gt;let res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, false);&lt;br&gt;// &amp;hellip;&lt;/br&gt;let last_res = d.decode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, true);&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;UTF_8.decode_without_bom_handling(&lt;var&gt;src&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail&quot;&gt;UTF-8 decode without BOM or fail&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;let d = UTF_8.new_decoder_without_bom_handling();&lt;br&gt;let res = d.decode_to_&lt;var&gt;*&lt;/var&gt;_without_replacement(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, false);&lt;br&gt;// &amp;hellip; (fail if malformed)&lt;/br&gt;let last_res = d.decode_to_&lt;var&gt;*&lt;/var&gt;_without_replacement(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, true);&lt;br&gt;// (fail if malformed)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;UTF_8.decode_without_bom_handling_and_without_replacement(&lt;var&gt;src&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#encode&quot;&gt;encode&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;let e = &lt;var&gt;encoding&lt;/var&gt;.new_encoder();&lt;br&gt;let res = e.encode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, false);&lt;br&gt;// &amp;hellip;&lt;/br&gt;let last_res = e.encode_to_&lt;var&gt;*&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst&lt;/var&gt;, true);&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;encoding&lt;/var&gt;.encode(&lt;var&gt;src&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;https://encoding.spec.whatwg.org/#utf-8-encode&quot;&gt;UTF-8 encode&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Use the UTF-8 nature of Rust strings directly:&lt;br&gt;&lt;code&gt;&lt;var&gt;write&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;.as_bytes());&lt;br&gt;// refill src&lt;br&gt;&lt;var&gt;write&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;.as_bytes());&lt;br&gt;// refill src&lt;br&gt;&lt;var&gt;write&lt;/var&gt;(&lt;var&gt;src&lt;/var&gt;.as_bytes());&lt;br&gt;// &amp;hellip;&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Use the UTF-8 nature of Rust strings directly:&lt;br&gt;&lt;code&gt;&lt;var&gt;src&lt;/var&gt;.as_bytes()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;/tbody&gt;
//! &lt;/table&gt;
//!
//! # Compatibility with the rust-encoding API
//!
//! The crate
//! [encoding_rs_compat](https://github.com/hsivonen/encoding_rs_compat/)
//! is a drop-in replacement for rust-encoding 0.2.32 that implements (most of)
//! the API of rust-encoding 0.2.32 on top of encoding_rs.
//!
//! # Mapping rust-encoding concepts to encoding_rs concepts
//!
//! The following table provides a mapping from rust-encoding constructs to
//! encoding_rs ones.
//!
//! &lt;table&gt;
//! &lt;thead&gt;
//! &lt;tr&gt;&lt;th&gt;rust-encoding&lt;/th&gt;&lt;th&gt;encoding_rs&lt;/th&gt;&lt;/tr&gt;
//! &lt;/thead&gt;
//! &lt;tbody&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncodingRef&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;amp;&#39;static encoding_rs::Encoding&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::all::&lt;var&gt;WINDOWS_31J&lt;/var&gt;&lt;/code&gt; (not based on the WHATWG name for some encodings)&lt;/td&gt;&lt;td&gt;&lt;code&gt;encoding_rs::&lt;var&gt;SHIFT_JIS&lt;/var&gt;&lt;/code&gt; (always the WHATWG name uppercased and hyphens replaced with underscores)&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::all::ERROR&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Not available because not in the Encoding Standard&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::all::ASCII&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Not available because not in the Encoding Standard&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::all::ISO_8859_1&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Not available because not in the Encoding Standard&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::all::HZ&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Not available because not in the Encoding Standard&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::label::encoding_from_whatwg_label(&lt;var&gt;string&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;encoding_rs::Encoding::for_label(&lt;var&gt;string&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.whatwg_name()&lt;/code&gt; (always lower case)&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.name()&lt;/code&gt; (potentially mixed case)&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.name()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Not available because not in the Encoding Standard&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::decode(&lt;var&gt;bytes&lt;/var&gt;, encoding::DecoderTrap::Replace, &lt;var&gt;enc&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.decode(&lt;var&gt;bytes&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.decode(&lt;var&gt;bytes&lt;/var&gt;, encoding::DecoderTrap::Replace)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.decode_without_bom_handling(&lt;var&gt;bytes&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.encode(&lt;var&gt;string&lt;/var&gt;, encoding::EncoderTrap::NcrEscape)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.encode(&lt;var&gt;string&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.raw_decoder()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.new_decoder_without_bom_handling()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.raw_encoder()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;enc&lt;/var&gt;.new_encoder()&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::RawDecoder&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;encoding_rs::Decoder&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::RawEncoder&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;encoding_rs::Encoder&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;raw_decoder&lt;/var&gt;.raw_feed(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst_string&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;dst_string&lt;/var&gt;.reserve(&lt;var&gt;decoder&lt;/var&gt;.max_utf8_buffer_length_without_replacement(&lt;var&gt;src&lt;/var&gt;.len()));&lt;br&gt;&lt;var&gt;decoder&lt;/var&gt;.decode_to_string_without_replacement(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst_string&lt;/var&gt;, false)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;raw_encoder&lt;/var&gt;.raw_feed(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst_vec&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;dst_vec&lt;/var&gt;.reserve(&lt;var&gt;encoder&lt;/var&gt;.max_buffer_length_from_utf8_without_replacement(&lt;var&gt;src&lt;/var&gt;.len()));&lt;br&gt;&lt;var&gt;encoder&lt;/var&gt;.encode_from_utf8_to_vec_without_replacement(&lt;var&gt;src&lt;/var&gt;, &lt;var&gt;dst_vec&lt;/var&gt;, false)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;raw_decoder&lt;/var&gt;.raw_finish(&lt;var&gt;dst&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;dst_string&lt;/var&gt;.reserve(&lt;var&gt;decoder&lt;/var&gt;.max_utf8_buffer_length_without_replacement(0));&lt;br&gt;&lt;var&gt;decoder&lt;/var&gt;.decode_to_string_without_replacement(b&quot;&quot;, &lt;var&gt;dst&lt;/var&gt;, true)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;raw_encoder&lt;/var&gt;.raw_finish(&lt;var&gt;dst&lt;/var&gt;)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;var&gt;dst_vec&lt;/var&gt;.reserve(&lt;var&gt;encoder&lt;/var&gt;.max_buffer_length_from_utf8_without_replacement(0));&lt;br&gt;&lt;var&gt;encoder&lt;/var&gt;.encode_from_utf8_to_vec_without_replacement(&quot;&quot;, &lt;var&gt;dst&lt;/var&gt;, true)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::DecoderTrap::Strict&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;decode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name (and treating the `Malformed` result as fatal).&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::DecoderTrap::Replace&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;decode*&lt;/code&gt; methods that &lt;i&gt;do not&lt;/i&gt; have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::DecoderTrap::Ignore&lt;/code&gt;&lt;/td&gt;&lt;td&gt;It is a bad idea to ignore errors due to security issues, but this could be implemented using &lt;code&gt;decode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::DecoderTrap::Call(DecoderTrapFunc)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Can be implemented using &lt;code&gt;decode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncoderTrap::Strict&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;encode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name (and treating the `Unmappable` result as fatal).&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncoderTrap::Replace&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Can be implemented using &lt;code&gt;encode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncoderTrap::Ignore&lt;/code&gt;&lt;/td&gt;&lt;td&gt;It is a bad idea to ignore errors due to security issues, but this could be implemented using &lt;code&gt;encode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncoderTrap::NcrEscape&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;encode*&lt;/code&gt; methods that &lt;i&gt;do not&lt;/i&gt; have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;&lt;code&gt;encoding::EncoderTrap::Call(EncoderTrapFunc)&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Can be implemented using &lt;code&gt;encode*&lt;/code&gt; methods that have &lt;code&gt;_without_replacement&lt;/code&gt; in their name.&lt;/td&gt;&lt;/tr&gt;
//! &lt;/tbody&gt;
//! &lt;/table&gt;
//!
//! # Relationship with Windows Code Pages
//!
//! Despite the Web and browser focus, the encodings defined by the Encoding
//! Standard and implemented by this crate may be useful for decoding legacy
//! data that uses Windows code pages. The following table names the single-byte
//! encodings
//! that have a closely related Windows code page, the number of the closest
//! code page, a column indicating whether Windows maps unassigned code points
//! to the Unicode Private Use Area instead of U+FFFD and a remark number
//! indicating remarks in the list after the table.
//!
//! &lt;table&gt;
//! &lt;thead&gt;
//! &lt;tr&gt;&lt;th&gt;Encoding&lt;/th&gt;&lt;th&gt;Code Page&lt;/th&gt;&lt;th&gt;PUA&lt;/th&gt;&lt;th&gt;Remarks&lt;/th&gt;&lt;/tr&gt;
//! &lt;/thead&gt;
//! &lt;tbody&gt;
//! &lt;tr&gt;&lt;td&gt;Shift_JIS&lt;/td&gt;&lt;td&gt;932&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;GBK&lt;/td&gt;&lt;td&gt;936&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;EUC-KR&lt;/td&gt;&lt;td&gt;949&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;Big5&lt;/td&gt;&lt;td&gt;950&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;IBM866&lt;/td&gt;&lt;td&gt;866&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-874&lt;/td&gt;&lt;td&gt;874&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;UTF-16LE&lt;/td&gt;&lt;td&gt;1200&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;UTF-16BE&lt;/td&gt;&lt;td&gt;1201&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1250&lt;/td&gt;&lt;td&gt;1250&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1251&lt;/td&gt;&lt;td&gt;1251&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1252&lt;/td&gt;&lt;td&gt;1252&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1253&lt;/td&gt;&lt;td&gt;1253&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1254&lt;/td&gt;&lt;td&gt;1254&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1255&lt;/td&gt;&lt;td&gt;1255&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1256&lt;/td&gt;&lt;td&gt;1256&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1257&lt;/td&gt;&lt;td&gt;1257&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;windows-1258&lt;/td&gt;&lt;td&gt;1258&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;macintosh&lt;/td&gt;&lt;td&gt;10000&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;x-mac-cyrillic&lt;/td&gt;&lt;td&gt;10017&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;KOI8-R&lt;/td&gt;&lt;td&gt;20866&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;EUC-JP&lt;/td&gt;&lt;td&gt;20932&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;KOI8-U&lt;/td&gt;&lt;td&gt;21866&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-2&lt;/td&gt;&lt;td&gt;28592&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-3&lt;/td&gt;&lt;td&gt;28593&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-4&lt;/td&gt;&lt;td&gt;28594&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-5&lt;/td&gt;&lt;td&gt;28595&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-6&lt;/td&gt;&lt;td&gt;28596&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-7&lt;/td&gt;&lt;td&gt;28597&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-8&lt;/td&gt;&lt;td&gt;28598&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-13&lt;/td&gt;&lt;td&gt;28603&lt;/td&gt;&lt;td&gt;&amp;bullet;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-15&lt;/td&gt;&lt;td&gt;28605&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-8-I&lt;/td&gt;&lt;td&gt;38598&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-2022-JP&lt;/td&gt;&lt;td&gt;50220&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;gb18030&lt;/td&gt;&lt;td&gt;54936&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;UTF-8&lt;/td&gt;&lt;td&gt;65001&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
//! &lt;/tbody&gt;
//! &lt;/table&gt;
//!
//! 1. Windows decodes 0xBD to U+2126 OHM SIGN instead of U+03A9 GREEK CAPITAL LETTER OMEGA.
//! 2. Windows decodes 0xFF to U+00A4 CURRENCY SIGN instead of U+20AC EURO SIGN.
//! 3. Windows decodes the currency signs at 0xA4 and 0xA5 as well as 0xAA,
//! which should be U+037A GREEK YPOGEGRAMMENI, to PUA code points. Windows
//! decodes 0xA1 to U+02BD MODIFIER LETTER REVERSED COMMA instead of U+2018
//! LEFT SINGLE QUOTATION MARK and 0xA2 to U+02BC MODIFIER LETTER APOSTROPHE
//! instead of U+2019 RIGHT SINGLE QUOTATION MARK.
//! 4. Windows decodes 0xAF to OVERLINE instead of MACRON and 0xFE and 0xFD to PUA instead
//! of LRM and RLM.
//! 5. Remarks from the previous item apply.
//!
//! The differences between this crate and Windows in the case of multibyte encodings
//! are not yet fully documented here. The lack of remarks above should not be taken
//! as indication of lack of differences.
//!
//! # Notable Differences from IANA Naming
//!
//! In some cases, the Encoding Standard specifies the popular unextended encoding
//! name where in IANA terms one of the other labels would be more precise considering
//! the extensions that the Encoding Standard has unified into the encoding.
//!
//! &lt;table&gt;
//! &lt;thead&gt;
//! &lt;tr&gt;&lt;th&gt;Encoding&lt;/th&gt;&lt;th&gt;IANA&lt;/th&gt;&lt;/tr&gt;
//! &lt;/thead&gt;
//! &lt;tbody&gt;
//! &lt;tr&gt;&lt;td&gt;Big5&lt;/td&gt;&lt;td&gt;Big5-HKSCS&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;EUC-KR&lt;/td&gt;&lt;td&gt;windows-949&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;Shift_JIS&lt;/td&gt;&lt;td&gt;windows-31j&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;x-mac-cyrillic&lt;/td&gt;&lt;td&gt;x-mac-ukrainian&lt;/td&gt;&lt;/tr&gt;
//! &lt;/tbody&gt;
//! &lt;/table&gt;
//!
//! In other cases where the Encoding Standard unifies unextended and extended
//! variants of an encoding, the encoding gets the name of the extended
//! variant.
//!
//! &lt;table&gt;
//! &lt;thead&gt;
//! &lt;tr&gt;&lt;th&gt;IANA&lt;/th&gt;&lt;th&gt;Unified into Encoding&lt;/th&gt;&lt;/tr&gt;
//! &lt;/thead&gt;
//! &lt;tbody&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-1&lt;/td&gt;&lt;td&gt;windows-1252&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;ISO-8859-9&lt;/td&gt;&lt;td&gt;windows-1254&lt;/td&gt;&lt;/tr&gt;
//! &lt;tr&gt;&lt;td&gt;TIS-620&lt;/td&gt;&lt;td&gt;windows-874&lt;/td&gt;&lt;/tr&gt;
//! &lt;/tbody&gt;
//! &lt;/table&gt;
//!
//! See the section [_UTF-16LE, UTF-16BE and Unicode Encoding Schemes_](#utf-16le-utf-16be-and-unicode-encoding-schemes)
//! for discussion about the UTF-16 family.
</span><span class="attribute">#![no_std]
#![cfg_attr(feature = <span class="string">&quot;simd-accel&quot;</span>, feature(core_intrinsics))]
#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[cfg_attr(test, macro_use)]
</span><span class="kw">extern crate </span>alloc;
<span class="kw">extern crate </span>core;
<span class="attribute">#[macro_use]
</span><span class="kw">extern crate </span>cfg_if;
<span class="attribute">#[cfg(all(
feature = <span class="string">&quot;simd-accel&quot;</span>,
any(
target_feature = <span class="string">&quot;sse2&quot;</span>,
all(target_endian = <span class="string">&quot;little&quot;</span>, target_arch = <span class="string">&quot;aarch64&quot;</span>),
all(target_endian = <span class="string">&quot;little&quot;</span>, target_feature = <span class="string">&quot;neon&quot;</span>)
)
))]
#[macro_use(shuffle)]
</span><span class="kw">extern crate </span>packed_simd;
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">extern crate </span>serde;
<span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;serde&quot;</span>))]
</span><span class="kw">extern crate </span>bincode;
<span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;serde&quot;</span>))]
#[macro_use]
</span><span class="kw">extern crate </span>serde_derive;
<span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;serde&quot;</span>))]
</span><span class="kw">extern crate </span>serde_json;
<span class="attribute">#[macro_use]
</span><span class="kw">mod </span>macros;
<span class="attribute">#[cfg(all(
feature = <span class="string">&quot;simd-accel&quot;</span>,
any(
target_feature = <span class="string">&quot;sse2&quot;</span>,
all(target_endian = <span class="string">&quot;little&quot;</span>, target_arch = <span class="string">&quot;aarch64&quot;</span>),
all(target_endian = <span class="string">&quot;little&quot;</span>, target_feature = <span class="string">&quot;neon&quot;</span>)
)
))]
</span><span class="kw">mod </span>simd_funcs;
<span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;alloc&quot;</span>))]
</span><span class="kw">mod </span>testing;
<span class="kw">mod </span>big5;
<span class="kw">mod </span>euc_jp;
<span class="kw">mod </span>euc_kr;
<span class="kw">mod </span>gb18030;
<span class="kw">mod </span>iso_2022_jp;
<span class="kw">mod </span>replacement;
<span class="kw">mod </span>shift_jis;
<span class="kw">mod </span>single_byte;
<span class="kw">mod </span>utf_16;
<span class="kw">mod </span>utf_8;
<span class="kw">mod </span>x_user_defined;
<span class="kw">mod </span>ascii;
<span class="kw">mod </span>data;
<span class="kw">mod </span>handles;
<span class="kw">mod </span>variant;
<span class="kw">pub mod </span>mem;
<span class="kw">use </span><span class="kw">crate</span>::ascii::ascii_valid_up_to;
<span class="kw">use </span><span class="kw">crate</span>::ascii::iso_2022_jp_ascii_valid_up_to;
<span class="kw">use </span><span class="kw">crate</span>::utf_8::utf8_valid_up_to;
<span class="kw">use </span><span class="kw">crate</span>::variant::<span class="kw-2">*</span>;
<span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">use </span>alloc::borrow::Cow;
<span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">use </span>alloc::string::String;
<span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">use </span>alloc::vec::Vec;
<span class="kw">use </span>core::cmp::Ordering;
<span class="kw">use </span>core::hash::Hash;
<span class="kw">use </span>core::hash::Hasher;
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">use </span>serde::de::Visitor;
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">use </span>serde::{Deserialize, Deserializer, Serialize, Serializer};
<span class="doccomment">/// This has to be the max length of an NCR instead of max
/// minus one, because we can&#39;t rely on getting the minus
/// one from the space reserved for the current unmappable,
/// because the ISO-2022-JP encoder can fill up that space
/// with a state transition escape.
</span><span class="kw">const </span>NCR_EXTRA: usize = <span class="number">10</span>; <span class="comment">// &amp;#1114111;
// BEGIN GENERATED CODE. PLEASE DO NOT EDIT.
// Instead, please regenerate using generate-encoding-data.py
</span><span class="kw">const </span>LONGEST_LABEL_LENGTH: usize = <span class="number">19</span>; <span class="comment">// cseucpkdfmtjapanese
</span><span class="doccomment">/// The initializer for the [Big5](static.BIG5.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>BIG5_INIT: Encoding = Encoding {
name: <span class="string">&quot;Big5&quot;</span>,
variant: VariantEncoding::Big5,
};
<span class="doccomment">/// The Big5 encoding.
///
/// This is Big5 with HKSCS with mappings to more recent Unicode assignments
/// instead of the Private Use Area code points that have been used historically.
/// It is believed to be able to decode existing Web content in a way that makes
/// sense.
///
/// To avoid form submissions generating data that Web servers don&#39;t understand,
/// the encoder doesn&#39;t use the HKSCS byte sequences that precede the unextended
/// Big5 in the lexical order.
///
/// [Index visualization](https://encoding.spec.whatwg.org/big5.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/big5-bmp.html)
///
/// This encoding is designed to be suited for decoding the Windows code page 950
/// and its HKSCS patched &quot;951&quot; variant such that the text makes sense, given
/// assignments that Unicode has made after those encodings used Private Use
/// Area characters.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>BIG5: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>BIG5_INIT;
<span class="doccomment">/// The initializer for the [EUC-JP](static.EUC_JP.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>EUC_JP_INIT: Encoding = Encoding {
name: <span class="string">&quot;EUC-JP&quot;</span>,
variant: VariantEncoding::EucJp,
};
<span class="doccomment">/// The EUC-JP encoding.
///
/// This is the legacy Unix encoding for Japanese.
///
/// For compatibility with Web servers that don&#39;t expect three-byte sequences
/// in form submissions, the encoder doesn&#39;t generate three-byte sequences.
/// That is, the JIS X 0212 support is decode-only.
///
/// [Index visualization](https://encoding.spec.whatwg.org/euc-jp.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/euc-jp-bmp.html)
///
/// This encoding roughly matches the Windows code page 20932. There are error
/// handling differences and a handful of 2-byte sequences that decode differently.
/// Additionall, Windows doesn&#39;t support 3-byte sequences.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>EUC_JP: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>EUC_JP_INIT;
<span class="doccomment">/// The initializer for the [EUC-KR](static.EUC_KR.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>EUC_KR_INIT: Encoding = Encoding {
name: <span class="string">&quot;EUC-KR&quot;</span>,
variant: VariantEncoding::EucKr,
};
<span class="doccomment">/// The EUC-KR encoding.
///
/// This is the Korean encoding for Windows. It extends the Unix legacy encoding
/// for Korean, based on KS X 1001 (which also formed the base of MacKorean on Mac OS
/// Classic), with all the characters from the Hangul Syllables block of Unicode.
///
/// [Index visualization](https://encoding.spec.whatwg.org/euc-kr.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/euc-kr-bmp.html)
///
/// This encoding matches the Windows code page 949, except Windows decodes byte 0x80
/// to U+0080 and some byte sequences that are error per the Encoding Standard to
/// the question mark or the Private Use Area.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>EUC_KR: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>EUC_KR_INIT;
<span class="doccomment">/// The initializer for the [GBK](static.GBK.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>GBK_INIT: Encoding = Encoding {
name: <span class="string">&quot;GBK&quot;</span>,
variant: VariantEncoding::Gbk,
};
<span class="doccomment">/// The GBK encoding.
///
/// The decoder for this encoding is the same as the decoder for gb18030.
/// The encoder side of this encoding is GBK with Windows code page 936 euro
/// sign behavior. GBK extends GB2312-80 to cover the CJK Unified Ideographs
/// Unicode block as well as a handful of ideographs from the CJK Unified
/// Ideographs Extension A and CJK Compatibility Ideographs blocks.
///
/// Unlike e.g. in the case of ISO-8859-1 and windows-1252, GBK encoder wasn&#39;t
/// unified with the gb18030 encoder in the Encoding Standard out of concern
/// that servers that expect GBK form submissions might not be able to handle
/// the four-byte sequences.
///
/// [Index visualization for the two-byte sequences](https://encoding.spec.whatwg.org/gb18030.html),
/// [Visualization of BMP coverage of the two-byte index](https://encoding.spec.whatwg.org/gb18030-bmp.html)
///
/// The encoder of this encoding roughly matches the Windows code page 936.
/// The decoder side is a superset.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>GBK: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>GBK_INIT;
<span class="doccomment">/// The initializer for the [IBM866](static.IBM866.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>IBM866_INIT: Encoding = Encoding {
name: <span class="string">&quot;IBM866&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.ibm866, <span class="number">0x0440</span>, <span class="number">96</span>, <span class="number">16</span>),
};
<span class="doccomment">/// The IBM866 encoding.
///
/// This the most notable one of the DOS Cyrillic code pages. It has the same
/// box drawing characters as code page 437, so it can be used for decoding
/// DOS-era ASCII + box drawing data.
///
/// [Index visualization](https://encoding.spec.whatwg.org/ibm866.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/ibm866-bmp.html)
///
/// This encoding matches the Windows code page 866.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>IBM866: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>IBM866_INIT;
<span class="doccomment">/// The initializer for the [ISO-2022-JP](static.ISO_2022_JP.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_2022_JP_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-2022-JP&quot;</span>,
variant: VariantEncoding::Iso2022Jp,
};
<span class="doccomment">/// The ISO-2022-JP encoding.
///
/// This the primary pre-UTF-8 encoding for Japanese email. It uses the ASCII
/// byte range to encode non-Basic Latin characters. It&#39;s the only encoding
/// supported by this crate whose encoder is stateful.
///
/// [Index visualization](https://encoding.spec.whatwg.org/jis0208.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/jis0208-bmp.html)
///
/// This encoding roughly matches the Windows code page 50220. Notably, Windows
/// uses U+30FB in place of the REPLACEMENT CHARACTER and otherwise differs in
/// error handling.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_2022_JP: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_2022_JP_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-10](static.ISO_8859_10.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_10_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-10&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_10, <span class="number">0x00DA</span>, <span class="number">90</span>, <span class="number">6</span>),
};
<span class="doccomment">/// The ISO-8859-10 encoding.
///
/// This is the Nordic part of the ISO/IEC 8859 encoding family. This encoding
/// is also known as Latin 6.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-10.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-10-bmp.html)
///
/// The Windows code page number for this encoding is 28600, but kernel32.dll
/// does not support this encoding.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_10: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_10_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-13](static.ISO_8859_13.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_13_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-13&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_13, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The ISO-8859-13 encoding.
///
/// This is the Baltic part of the ISO/IEC 8859 encoding family. This encoding
/// is also known as Latin 7.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-13.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-13-bmp.html)
///
/// This encoding matches the Windows code page 28603, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_13: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_13_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-14](static.ISO_8859_14.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_14_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-14&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_14, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">17</span>),
};
<span class="doccomment">/// The ISO-8859-14 encoding.
///
/// This is the Celtic part of the ISO/IEC 8859 encoding family. This encoding
/// is also known as Latin 8.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-14.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-14-bmp.html)
///
/// The Windows code page number for this encoding is 28604, but kernel32.dll
/// does not support this encoding.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_14: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_14_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-15](static.ISO_8859_15.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_15_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-15&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_15, <span class="number">0x00BF</span>, <span class="number">63</span>, <span class="number">65</span>),
};
<span class="doccomment">/// The ISO-8859-15 encoding.
///
/// This is the revised Western European part of the ISO/IEC 8859 encoding
/// family. This encoding is also known as Latin 9.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-15.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-15-bmp.html)
///
/// This encoding matches the Windows code page 28605.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_15: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_15_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-16](static.ISO_8859_16.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_16_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-16&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_16, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">4</span>),
};
<span class="doccomment">/// The ISO-8859-16 encoding.
///
/// This is the South-Eastern European part of the ISO/IEC 8859 encoding
/// family. This encoding is also known as Latin 10.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-16.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-16-bmp.html)
///
/// The Windows code page number for this encoding is 28606, but kernel32.dll
/// does not support this encoding.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_16: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_16_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-2](static.ISO_8859_2.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_2_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-2&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_2, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The ISO-8859-2 encoding.
///
/// This is the Central European part of the ISO/IEC 8859 encoding family. This encoding is also known as Latin 2.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-2.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-2-bmp.html)
///
/// This encoding matches the Windows code page 28592.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_2: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_2_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-3](static.ISO_8859_3.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_3_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-3&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_3, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">4</span>),
};
<span class="doccomment">/// The ISO-8859-3 encoding.
///
/// This is the South European part of the ISO/IEC 8859 encoding family. This encoding is also known as Latin 3.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-3.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-3-bmp.html)
///
/// This encoding matches the Windows code page 28593.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_3: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_3_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-4](static.ISO_8859_4.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_4_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-4&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_4, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The ISO-8859-4 encoding.
///
/// This is the North European part of the ISO/IEC 8859 encoding family. This encoding is also known as Latin 4.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-4.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-4-bmp.html)
///
/// This encoding matches the Windows code page 28594.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_4: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_4_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-5](static.ISO_8859_5.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_5_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-5&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_5, <span class="number">0x040E</span>, <span class="number">46</span>, <span class="number">66</span>),
};
<span class="doccomment">/// The ISO-8859-5 encoding.
///
/// This is the Cyrillic part of the ISO/IEC 8859 encoding family.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-5.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-5-bmp.html)
///
/// This encoding matches the Windows code page 28595.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_5: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_5_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-6](static.ISO_8859_6.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_6_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-6&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_6, <span class="number">0x0621</span>, <span class="number">65</span>, <span class="number">26</span>),
};
<span class="doccomment">/// The ISO-8859-6 encoding.
///
/// This is the Arabic part of the ISO/IEC 8859 encoding family.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-6.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-6-bmp.html)
///
/// This encoding matches the Windows code page 28596, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_6: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_6_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-7](static.ISO_8859_7.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_7_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-7&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_7, <span class="number">0x03A3</span>, <span class="number">83</span>, <span class="number">44</span>),
};
<span class="doccomment">/// The ISO-8859-7 encoding.
///
/// This is the Greek part of the ISO/IEC 8859 encoding family.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-7.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-7-bmp.html)
///
/// This encoding roughly matches the Windows code page 28597. Windows decodes
/// unassigned code points, the currency signs at 0xA4 and 0xA5 as well as
/// 0xAA, which should be U+037A GREEK YPOGEGRAMMENI, to the Private Use Area
/// of Unicode. Windows decodes 0xA1 to U+02BD MODIFIER LETTER REVERSED COMMA
/// instead of U+2018 LEFT SINGLE QUOTATION MARK and 0xA2 to U+02BC MODIFIER
/// LETTER APOSTROPHE instead of U+2019 RIGHT SINGLE QUOTATION MARK.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_7: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_7_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-8](static.ISO_8859_8.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_8_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-8&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_8, <span class="number">0x05D0</span>, <span class="number">96</span>, <span class="number">27</span>),
};
<span class="doccomment">/// The ISO-8859-8 encoding.
///
/// This is the Hebrew part of the ISO/IEC 8859 encoding family in visual order.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-8.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-8-bmp.html)
///
/// This encoding roughly matches the Windows code page 28598. Windows decodes
/// 0xAF to OVERLINE instead of MACRON and 0xFE and 0xFD to the Private Use
/// Area instead of LRM and RLM. Windows decodes unassigned code points to
/// the private use area.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_8: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_8_INIT;
<span class="doccomment">/// The initializer for the [ISO-8859-8-I](static.ISO_8859_8_I.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>ISO_8859_8_I_INIT: Encoding = Encoding {
name: <span class="string">&quot;ISO-8859-8-I&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.iso_8859_8, <span class="number">0x05D0</span>, <span class="number">96</span>, <span class="number">27</span>),
};
<span class="doccomment">/// The ISO-8859-8-I encoding.
///
/// This is the Hebrew part of the ISO/IEC 8859 encoding family in logical order.
///
/// [Index visualization](https://encoding.spec.whatwg.org/iso-8859-8.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/iso-8859-8-bmp.html)
///
/// This encoding roughly matches the Windows code page 38598. Windows decodes
/// 0xAF to OVERLINE instead of MACRON and 0xFE and 0xFD to the Private Use
/// Area instead of LRM and RLM. Windows decodes unassigned code points to
/// the private use area.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>ISO_8859_8_I: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>ISO_8859_8_I_INIT;
<span class="doccomment">/// The initializer for the [KOI8-R](static.KOI8_R.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>KOI8_R_INIT: Encoding = Encoding {
name: <span class="string">&quot;KOI8-R&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.koi8_r, <span class="number">0x044E</span>, <span class="number">64</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The KOI8-R encoding.
///
/// This is an encoding for Russian from [RFC 1489](https://tools.ietf.org/html/rfc1489).
///
/// [Index visualization](https://encoding.spec.whatwg.org/koi8-r.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/koi8-r-bmp.html)
///
/// This encoding matches the Windows code page 20866.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>KOI8_R: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>KOI8_R_INIT;
<span class="doccomment">/// The initializer for the [KOI8-U](static.KOI8_U.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>KOI8_U_INIT: Encoding = Encoding {
name: <span class="string">&quot;KOI8-U&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.koi8_u, <span class="number">0x044E</span>, <span class="number">64</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The KOI8-U encoding.
///
/// This is an encoding for Ukrainian adapted from KOI8-R.
///
/// [Index visualization](https://encoding.spec.whatwg.org/koi8-u.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/koi8-u-bmp.html)
///
/// This encoding matches the Windows code page 21866.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>KOI8_U: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>KOI8_U_INIT;
<span class="doccomment">/// The initializer for the [Shift_JIS](static.SHIFT_JIS.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>SHIFT_JIS_INIT: Encoding = Encoding {
name: <span class="string">&quot;Shift_JIS&quot;</span>,
variant: VariantEncoding::ShiftJis,
};
<span class="doccomment">/// The Shift_JIS encoding.
///
/// This is the Japanese encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/shift_jis.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/shift_jis-bmp.html)
///
/// This encoding matches the Windows code page 932, except Windows decodes some byte
/// sequences that are error per the Encoding Standard to the question mark or the
/// Private Use Area and generally uses U+30FB in place of the REPLACEMENT CHARACTER.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>SHIFT_JIS: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>SHIFT_JIS_INIT;
<span class="doccomment">/// The initializer for the [UTF-16BE](static.UTF_16BE.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>UTF_16BE_INIT: Encoding = Encoding {
name: <span class="string">&quot;UTF-16BE&quot;</span>,
variant: VariantEncoding::Utf16Be,
};
<span class="doccomment">/// The UTF-16BE encoding.
///
/// This decode-only encoding uses 16-bit code units due to Unicode originally
/// having been designed as a 16-bit reportoire. In the absence of a byte order
/// mark the big endian byte order is assumed.
///
/// There is no corresponding encoder in this crate or in the Encoding
/// Standard. The output encoding of this encoding is UTF-8.
///
/// This encoding matches the Windows code page 1201.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>UTF_16BE: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>UTF_16BE_INIT;
<span class="doccomment">/// The initializer for the [UTF-16LE](static.UTF_16LE.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>UTF_16LE_INIT: Encoding = Encoding {
name: <span class="string">&quot;UTF-16LE&quot;</span>,
variant: VariantEncoding::Utf16Le,
};
<span class="doccomment">/// The UTF-16LE encoding.
///
/// This decode-only encoding uses 16-bit code units due to Unicode originally
/// having been designed as a 16-bit reportoire. In the absence of a byte order
/// mark the little endian byte order is assumed.
///
/// There is no corresponding encoder in this crate or in the Encoding
/// Standard. The output encoding of this encoding is UTF-8.
///
/// This encoding matches the Windows code page 1200.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>UTF_16LE: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>UTF_16LE_INIT;
<span class="doccomment">/// The initializer for the [UTF-8](static.UTF_8.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>UTF_8_INIT: Encoding = Encoding {
name: <span class="string">&quot;UTF-8&quot;</span>,
variant: VariantEncoding::Utf8,
};
<span class="doccomment">/// The UTF-8 encoding.
///
/// This is the encoding that should be used for all new development it can
/// represent all of Unicode.
///
/// This encoding matches the Windows code page 65001, except Windows differs
/// in the number of errors generated for some erroneous byte sequences.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>UTF_8: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>UTF_8_INIT;
<span class="doccomment">/// The initializer for the [gb18030](static.GB18030.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>GB18030_INIT: Encoding = Encoding {
name: <span class="string">&quot;gb18030&quot;</span>,
variant: VariantEncoding::Gb18030,
};
<span class="doccomment">/// The gb18030 encoding.
///
/// This encoding matches GB18030-2005 except the two-byte sequence 0xA3 0xA0
/// maps to U+3000 for compatibility with existing Web content. As a result,
/// this encoding can represent all of Unicode except for the private-use
/// character U+E5E5.
///
/// [Index visualization for the two-byte sequences](https://encoding.spec.whatwg.org/gb18030.html),
/// [Visualization of BMP coverage of the two-byte index](https://encoding.spec.whatwg.org/gb18030-bmp.html)
///
/// This encoding matches the Windows code page 54936.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>GB18030: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>GB18030_INIT;
<span class="doccomment">/// The initializer for the [macintosh](static.MACINTOSH.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>MACINTOSH_INIT: Encoding = Encoding {
name: <span class="string">&quot;macintosh&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.macintosh, <span class="number">0x00CD</span>, <span class="number">106</span>, <span class="number">3</span>),
};
<span class="doccomment">/// The macintosh encoding.
///
/// This is the MacRoman encoding from Mac OS Classic.
///
/// [Index visualization](https://encoding.spec.whatwg.org/macintosh.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/macintosh-bmp.html)
///
/// This encoding matches the Windows code page 10000, except Windows decodes
/// 0xBD to U+2126 OHM SIGN instead of U+03A9 GREEK CAPITAL LETTER OMEGA.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>MACINTOSH: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>MACINTOSH_INIT;
<span class="doccomment">/// The initializer for the [replacement](static.REPLACEMENT.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>REPLACEMENT_INIT: Encoding = Encoding {
name: <span class="string">&quot;replacement&quot;</span>,
variant: VariantEncoding::Replacement,
};
<span class="doccomment">/// The replacement encoding.
///
/// This decode-only encoding decodes all non-zero-length streams to a single
/// REPLACEMENT CHARACTER. Its purpose is to avoid the use of an
/// ASCII-compatible fallback encoding (typically windows-1252) for some
/// encodings that are no longer supported by the Web Platform and that
/// would be dangerous to treat as ASCII-compatible.
///
/// There is no corresponding encoder. The output encoding of this encoding
/// is UTF-8.
///
/// This encoding does not have a Windows code page number.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>REPLACEMENT: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>REPLACEMENT_INIT;
<span class="doccomment">/// The initializer for the [windows-1250](static.WINDOWS_1250.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1250_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1250&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1250, <span class="number">0x00DC</span>, <span class="number">92</span>, <span class="number">2</span>),
};
<span class="doccomment">/// The windows-1250 encoding.
///
/// This is the Central European encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1250.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1250-bmp.html)
///
/// This encoding matches the Windows code page 1250.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1250: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1250_INIT;
<span class="doccomment">/// The initializer for the [windows-1251](static.WINDOWS_1251.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1251_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1251&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1251, <span class="number">0x0410</span>, <span class="number">64</span>, <span class="number">64</span>),
};
<span class="doccomment">/// The windows-1251 encoding.
///
/// This is the Cyrillic encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1251.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1251-bmp.html)
///
/// This encoding matches the Windows code page 1251.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1251: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1251_INIT;
<span class="doccomment">/// The initializer for the [windows-1252](static.WINDOWS_1252.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1252_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1252&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1252, <span class="number">0x00A0</span>, <span class="number">32</span>, <span class="number">96</span>),
};
<span class="doccomment">/// The windows-1252 encoding.
///
/// This is the Western encoding for Windows. It is an extension of ISO-8859-1,
/// which is known as Latin 1.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1252.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1252-bmp.html)
///
/// This encoding matches the Windows code page 1252.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1252: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1252_INIT;
<span class="doccomment">/// The initializer for the [windows-1253](static.WINDOWS_1253.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1253_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1253&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1253, <span class="number">0x03A3</span>, <span class="number">83</span>, <span class="number">44</span>),
};
<span class="doccomment">/// The windows-1253 encoding.
///
/// This is the Greek encoding for Windows. It is mostly an extension of
/// ISO-8859-7, but U+0386 is mapped to a different byte.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1253.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1253-bmp.html)
///
/// This encoding matches the Windows code page 1253, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1253: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1253_INIT;
<span class="doccomment">/// The initializer for the [windows-1254](static.WINDOWS_1254.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1254_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1254&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1254, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">17</span>),
};
<span class="doccomment">/// The windows-1254 encoding.
///
/// This is the Turkish encoding for Windows. It is an extension of ISO-8859-9,
/// which is known as Latin 5.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1254.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1254-bmp.html)
///
/// This encoding matches the Windows code page 1254.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1254: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1254_INIT;
<span class="doccomment">/// The initializer for the [windows-1255](static.WINDOWS_1255.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1255_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1255&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1255, <span class="number">0x05D0</span>, <span class="number">96</span>, <span class="number">27</span>),
};
<span class="doccomment">/// The windows-1255 encoding.
///
/// This is the Hebrew encoding for Windows. It is an extension of ISO-8859-8-I,
/// except for a currency sign swap.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1255.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1255-bmp.html)
///
/// This encoding matches the Windows code page 1255, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1255: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1255_INIT;
<span class="doccomment">/// The initializer for the [windows-1256](static.WINDOWS_1256.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1256_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1256&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1256, <span class="number">0x0621</span>, <span class="number">65</span>, <span class="number">22</span>),
};
<span class="doccomment">/// The windows-1256 encoding.
///
/// This is the Arabic encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1256.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1256-bmp.html)
///
/// This encoding matches the Windows code page 1256.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1256: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1256_INIT;
<span class="doccomment">/// The initializer for the [windows-1257](static.WINDOWS_1257.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1257_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1257&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1257, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">1</span>),
};
<span class="doccomment">/// The windows-1257 encoding.
///
/// This is the Baltic encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1257.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1257-bmp.html)
///
/// This encoding matches the Windows code page 1257, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1257: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1257_INIT;
<span class="doccomment">/// The initializer for the [windows-1258](static.WINDOWS_1258.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_1258_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-1258&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_1258, <span class="number">0x00DF</span>, <span class="number">95</span>, <span class="number">4</span>),
};
<span class="doccomment">/// The windows-1258 encoding.
///
/// This is the Vietnamese encoding for Windows.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-1258.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-1258-bmp.html)
///
/// This encoding matches the Windows code page 1258 when used in the
/// non-normalizing mode. Unlike with the other single-byte encodings, the
/// result of decoding is not necessarily in Normalization Form C. On the
/// other hand, input in the Normalization Form C is not encoded without
/// replacement. In general, it&#39;s a bad idea to encode to encodings other
/// than UTF-8, but this encoding is especially hazardous to encode to.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_1258: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_1258_INIT;
<span class="doccomment">/// The initializer for the [windows-874](static.WINDOWS_874.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>WINDOWS_874_INIT: Encoding = Encoding {
name: <span class="string">&quot;windows-874&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.windows_874, <span class="number">0x0E01</span>, <span class="number">33</span>, <span class="number">58</span>),
};
<span class="doccomment">/// The windows-874 encoding.
///
/// This is the Thai encoding for Windows. It is an extension of TIS-620 / ISO-8859-11.
///
/// [Index visualization](https://encoding.spec.whatwg.org/windows-874.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/windows-874-bmp.html)
///
/// This encoding matches the Windows code page 874, except Windows decodes
/// unassigned code points to the Private Use Area of Unicode.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>WINDOWS_874: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>WINDOWS_874_INIT;
<span class="doccomment">/// The initializer for the [x-mac-cyrillic](static.X_MAC_CYRILLIC.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>X_MAC_CYRILLIC_INIT: Encoding = Encoding {
name: <span class="string">&quot;x-mac-cyrillic&quot;</span>,
variant: VariantEncoding::SingleByte(<span class="kw-2">&amp;</span>data::SINGLE_BYTE_DATA.x_mac_cyrillic, <span class="number">0x0430</span>, <span class="number">96</span>, <span class="number">31</span>),
};
<span class="doccomment">/// The x-mac-cyrillic encoding.
///
/// This is the MacUkrainian encoding from Mac OS Classic.
///
/// [Index visualization](https://encoding.spec.whatwg.org/x-mac-cyrillic.html),
/// [Visualization of BMP coverage](https://encoding.spec.whatwg.org/x-mac-cyrillic-bmp.html)
///
/// This encoding matches the Windows code page 10017.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>X_MAC_CYRILLIC: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>X_MAC_CYRILLIC_INIT;
<span class="doccomment">/// The initializer for the [x-user-defined](static.X_USER_DEFINED.html) encoding.
///
/// For use only for taking the address of this form when
/// Rust prohibits the use of the non-`_INIT` form directly,
/// such as in initializers of other `static`s. If in doubt,
/// use the corresponding non-`_INIT` reference-typed `static`.
///
/// This part of the public API will go away if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate or if Rust starts allowing static arrays
/// to be initialized with `pub static FOO: &amp;&#39;static Encoding`
/// items.
</span><span class="kw">pub static </span>X_USER_DEFINED_INIT: Encoding = Encoding {
name: <span class="string">&quot;x-user-defined&quot;</span>,
variant: VariantEncoding::UserDefined,
};
<span class="doccomment">/// The x-user-defined encoding.
///
/// This encoding offsets the non-ASCII bytes by `0xF700` thereby decoding
/// them to the Private Use Area of Unicode. It was used for loading binary
/// data into a JavaScript string using `XMLHttpRequest` before XHR supported
/// the `&quot;arraybuffer&quot;` response type.
///
/// This encoding does not have a Windows code page number.
///
/// This will change from `static` to `const` if Rust changes
/// to make the referent of `pub const FOO: &amp;&#39;static Encoding`
/// unique cross-crate, so don&#39;t take the address of this
/// `static`.
</span><span class="kw">pub static </span>X_USER_DEFINED: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding = <span class="kw-2">&amp;</span>X_USER_DEFINED_INIT;
<span class="kw">static </span>LABELS_SORTED: [<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str; <span class="number">228</span>] = [
<span class="string">&quot;l1&quot;</span>,
<span class="string">&quot;l2&quot;</span>,
<span class="string">&quot;l3&quot;</span>,
<span class="string">&quot;l4&quot;</span>,
<span class="string">&quot;l5&quot;</span>,
<span class="string">&quot;l6&quot;</span>,
<span class="string">&quot;l9&quot;</span>,
<span class="string">&quot;866&quot;</span>,
<span class="string">&quot;mac&quot;</span>,
<span class="string">&quot;koi&quot;</span>,
<span class="string">&quot;gbk&quot;</span>,
<span class="string">&quot;big5&quot;</span>,
<span class="string">&quot;utf8&quot;</span>,
<span class="string">&quot;koi8&quot;</span>,
<span class="string">&quot;sjis&quot;</span>,
<span class="string">&quot;ucs-2&quot;</span>,
<span class="string">&quot;ms932&quot;</span>,
<span class="string">&quot;cp866&quot;</span>,
<span class="string">&quot;utf-8&quot;</span>,
<span class="string">&quot;cp819&quot;</span>,
<span class="string">&quot;ascii&quot;</span>,
<span class="string">&quot;x-gbk&quot;</span>,
<span class="string">&quot;greek&quot;</span>,
<span class="string">&quot;cp1250&quot;</span>,
<span class="string">&quot;cp1251&quot;</span>,
<span class="string">&quot;latin1&quot;</span>,
<span class="string">&quot;gb2312&quot;</span>,
<span class="string">&quot;cp1252&quot;</span>,
<span class="string">&quot;latin2&quot;</span>,
<span class="string">&quot;cp1253&quot;</span>,
<span class="string">&quot;latin3&quot;</span>,
<span class="string">&quot;cp1254&quot;</span>,
<span class="string">&quot;latin4&quot;</span>,
<span class="string">&quot;cp1255&quot;</span>,
<span class="string">&quot;csbig5&quot;</span>,
<span class="string">&quot;latin5&quot;</span>,
<span class="string">&quot;utf-16&quot;</span>,
<span class="string">&quot;cp1256&quot;</span>,
<span class="string">&quot;ibm866&quot;</span>,
<span class="string">&quot;latin6&quot;</span>,
<span class="string">&quot;cp1257&quot;</span>,
<span class="string">&quot;cp1258&quot;</span>,
<span class="string">&quot;greek8&quot;</span>,
<span class="string">&quot;ibm819&quot;</span>,
<span class="string">&quot;arabic&quot;</span>,
<span class="string">&quot;visual&quot;</span>,
<span class="string">&quot;korean&quot;</span>,
<span class="string">&quot;euc-jp&quot;</span>,
<span class="string">&quot;koi8-r&quot;</span>,
<span class="string">&quot;koi8_r&quot;</span>,
<span class="string">&quot;euc-kr&quot;</span>,
<span class="string">&quot;x-sjis&quot;</span>,
<span class="string">&quot;koi8-u&quot;</span>,
<span class="string">&quot;hebrew&quot;</span>,
<span class="string">&quot;tis-620&quot;</span>,
<span class="string">&quot;gb18030&quot;</span>,
<span class="string">&quot;ksc5601&quot;</span>,
<span class="string">&quot;gb_2312&quot;</span>,
<span class="string">&quot;dos-874&quot;</span>,
<span class="string">&quot;cn-big5&quot;</span>,
<span class="string">&quot;unicode&quot;</span>,
<span class="string">&quot;chinese&quot;</span>,
<span class="string">&quot;logical&quot;</span>,
<span class="string">&quot;cskoi8r&quot;</span>,
<span class="string">&quot;cseuckr&quot;</span>,
<span class="string">&quot;koi8-ru&quot;</span>,
<span class="string">&quot;x-cp1250&quot;</span>,
<span class="string">&quot;ksc_5601&quot;</span>,
<span class="string">&quot;x-cp1251&quot;</span>,
<span class="string">&quot;iso88591&quot;</span>,
<span class="string">&quot;csgb2312&quot;</span>,
<span class="string">&quot;x-cp1252&quot;</span>,
<span class="string">&quot;iso88592&quot;</span>,
<span class="string">&quot;x-cp1253&quot;</span>,
<span class="string">&quot;iso88593&quot;</span>,
<span class="string">&quot;ecma-114&quot;</span>,
<span class="string">&quot;x-cp1254&quot;</span>,
<span class="string">&quot;iso88594&quot;</span>,
<span class="string">&quot;x-cp1255&quot;</span>,
<span class="string">&quot;iso88595&quot;</span>,
<span class="string">&quot;x-x-big5&quot;</span>,
<span class="string">&quot;x-cp1256&quot;</span>,
<span class="string">&quot;csibm866&quot;</span>,
<span class="string">&quot;iso88596&quot;</span>,
<span class="string">&quot;x-cp1257&quot;</span>,
<span class="string">&quot;iso88597&quot;</span>,
<span class="string">&quot;asmo-708&quot;</span>,
<span class="string">&quot;ecma-118&quot;</span>,
<span class="string">&quot;elot_928&quot;</span>,
<span class="string">&quot;x-cp1258&quot;</span>,
<span class="string">&quot;iso88598&quot;</span>,
<span class="string">&quot;iso88599&quot;</span>,
<span class="string">&quot;cyrillic&quot;</span>,
<span class="string">&quot;utf-16be&quot;</span>,
<span class="string">&quot;utf-16le&quot;</span>,
<span class="string">&quot;us-ascii&quot;</span>,
<span class="string">&quot;ms_kanji&quot;</span>,
<span class="string">&quot;x-euc-jp&quot;</span>,
<span class="string">&quot;iso885910&quot;</span>,
<span class="string">&quot;iso8859-1&quot;</span>,
<span class="string">&quot;iso885911&quot;</span>,
<span class="string">&quot;iso8859-2&quot;</span>,
<span class="string">&quot;iso8859-3&quot;</span>,
<span class="string">&quot;iso885913&quot;</span>,
<span class="string">&quot;iso8859-4&quot;</span>,
<span class="string">&quot;iso885914&quot;</span>,
<span class="string">&quot;iso8859-5&quot;</span>,
<span class="string">&quot;iso885915&quot;</span>,
<span class="string">&quot;iso8859-6&quot;</span>,
<span class="string">&quot;iso8859-7&quot;</span>,
<span class="string">&quot;iso8859-8&quot;</span>,
<span class="string">&quot;iso-ir-58&quot;</span>,
<span class="string">&quot;iso8859-9&quot;</span>,
<span class="string">&quot;csunicode&quot;</span>,
<span class="string">&quot;macintosh&quot;</span>,
<span class="string">&quot;shift-jis&quot;</span>,
<span class="string">&quot;shift_jis&quot;</span>,
<span class="string">&quot;iso-ir-100&quot;</span>,
<span class="string">&quot;iso8859-10&quot;</span>,
<span class="string">&quot;iso-ir-110&quot;</span>,
<span class="string">&quot;gb_2312-80&quot;</span>,
<span class="string">&quot;iso-8859-1&quot;</span>,
<span class="string">&quot;iso_8859-1&quot;</span>,
<span class="string">&quot;iso-ir-101&quot;</span>,
<span class="string">&quot;iso8859-11&quot;</span>,
<span class="string">&quot;iso-8859-2&quot;</span>,
<span class="string">&quot;iso_8859-2&quot;</span>,
<span class="string">&quot;hz-gb-2312&quot;</span>,
<span class="string">&quot;iso-8859-3&quot;</span>,
<span class="string">&quot;iso_8859-3&quot;</span>,
<span class="string">&quot;iso8859-13&quot;</span>,
<span class="string">&quot;iso-8859-4&quot;</span>,
<span class="string">&quot;iso_8859-4&quot;</span>,
<span class="string">&quot;iso8859-14&quot;</span>,
<span class="string">&quot;iso-ir-144&quot;</span>,
<span class="string">&quot;iso-8859-5&quot;</span>,
<span class="string">&quot;iso_8859-5&quot;</span>,
<span class="string">&quot;iso8859-15&quot;</span>,
<span class="string">&quot;iso-8859-6&quot;</span>,
<span class="string">&quot;iso_8859-6&quot;</span>,
<span class="string">&quot;iso-ir-126&quot;</span>,
<span class="string">&quot;iso-8859-7&quot;</span>,
<span class="string">&quot;iso_8859-7&quot;</span>,
<span class="string">&quot;iso-ir-127&quot;</span>,
<span class="string">&quot;iso-ir-157&quot;</span>,
<span class="string">&quot;iso-8859-8&quot;</span>,
<span class="string">&quot;iso_8859-8&quot;</span>,
<span class="string">&quot;iso-ir-138&quot;</span>,
<span class="string">&quot;iso-ir-148&quot;</span>,
<span class="string">&quot;iso-8859-9&quot;</span>,
<span class="string">&quot;iso_8859-9&quot;</span>,
<span class="string">&quot;iso-ir-109&quot;</span>,
<span class="string">&quot;iso-ir-149&quot;</span>,
<span class="string">&quot;big5-hkscs&quot;</span>,
<span class="string">&quot;csshiftjis&quot;</span>,
<span class="string">&quot;iso-8859-10&quot;</span>,
<span class="string">&quot;iso-8859-11&quot;</span>,
<span class="string">&quot;csisolatin1&quot;</span>,
<span class="string">&quot;csisolatin2&quot;</span>,
<span class="string">&quot;iso-8859-13&quot;</span>,
<span class="string">&quot;csisolatin3&quot;</span>,
<span class="string">&quot;iso-8859-14&quot;</span>,
<span class="string">&quot;windows-874&quot;</span>,
<span class="string">&quot;csisolatin4&quot;</span>,
<span class="string">&quot;iso-8859-15&quot;</span>,
<span class="string">&quot;iso_8859-15&quot;</span>,
<span class="string">&quot;csisolatin5&quot;</span>,
<span class="string">&quot;iso-8859-16&quot;</span>,
<span class="string">&quot;csisolatin6&quot;</span>,
<span class="string">&quot;windows-949&quot;</span>,
<span class="string">&quot;csisolatin9&quot;</span>,
<span class="string">&quot;csiso88596e&quot;</span>,
<span class="string">&quot;csiso88598e&quot;</span>,
<span class="string">&quot;unicodefffe&quot;</span>,
<span class="string">&quot;unicodefeff&quot;</span>,
<span class="string">&quot;csmacintosh&quot;</span>,
<span class="string">&quot;csiso88596i&quot;</span>,
<span class="string">&quot;csiso88598i&quot;</span>,
<span class="string">&quot;windows-31j&quot;</span>,
<span class="string">&quot;x-mac-roman&quot;</span>,
<span class="string">&quot;iso-2022-cn&quot;</span>,
<span class="string">&quot;iso-2022-jp&quot;</span>,
<span class="string">&quot;csiso2022jp&quot;</span>,
<span class="string">&quot;iso-2022-kr&quot;</span>,
<span class="string">&quot;csiso2022kr&quot;</span>,
<span class="string">&quot;replacement&quot;</span>,
<span class="string">&quot;windows-1250&quot;</span>,
<span class="string">&quot;windows-1251&quot;</span>,
<span class="string">&quot;windows-1252&quot;</span>,
<span class="string">&quot;windows-1253&quot;</span>,
<span class="string">&quot;windows-1254&quot;</span>,
<span class="string">&quot;windows-1255&quot;</span>,
<span class="string">&quot;windows-1256&quot;</span>,
<span class="string">&quot;windows-1257&quot;</span>,
<span class="string">&quot;windows-1258&quot;</span>,
<span class="string">&quot;iso-8859-6-e&quot;</span>,
<span class="string">&quot;iso-8859-8-e&quot;</span>,
<span class="string">&quot;iso-8859-6-i&quot;</span>,
<span class="string">&quot;iso-8859-8-i&quot;</span>,
<span class="string">&quot;sun_eu_greek&quot;</span>,
<span class="string">&quot;csksc56011987&quot;</span>,
<span class="string">&quot;unicode20utf8&quot;</span>,
<span class="string">&quot;unicode11utf8&quot;</span>,
<span class="string">&quot;ks_c_5601-1987&quot;</span>,
<span class="string">&quot;ansi_x3.4-1968&quot;</span>,
<span class="string">&quot;ks_c_5601-1989&quot;</span>,
<span class="string">&quot;x-mac-cyrillic&quot;</span>,
<span class="string">&quot;x-user-defined&quot;</span>,
<span class="string">&quot;csiso58gb231280&quot;</span>,
<span class="string">&quot;iso-10646-ucs-2&quot;</span>,
<span class="string">&quot;iso_8859-1:1987&quot;</span>,
<span class="string">&quot;iso_8859-2:1987&quot;</span>,
<span class="string">&quot;iso_8859-6:1987&quot;</span>,
<span class="string">&quot;iso_8859-7:1987&quot;</span>,
<span class="string">&quot;iso_8859-3:1988&quot;</span>,
<span class="string">&quot;iso_8859-4:1988&quot;</span>,
<span class="string">&quot;iso_8859-5:1988&quot;</span>,
<span class="string">&quot;iso_8859-8:1988&quot;</span>,
<span class="string">&quot;x-unicode20utf8&quot;</span>,
<span class="string">&quot;iso_8859-9:1989&quot;</span>,
<span class="string">&quot;csisolatingreek&quot;</span>,
<span class="string">&quot;x-mac-ukrainian&quot;</span>,
<span class="string">&quot;iso-2022-cn-ext&quot;</span>,
<span class="string">&quot;csisolatinarabic&quot;</span>,
<span class="string">&quot;csisolatinhebrew&quot;</span>,
<span class="string">&quot;unicode-1-1-utf-8&quot;</span>,
<span class="string">&quot;csisolatincyrillic&quot;</span>,
<span class="string">&quot;cseucpkdfmtjapanese&quot;</span>,
];
<span class="kw">static </span>ENCODINGS_IN_LABEL_SORT: [<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding; <span class="number">228</span>] = [
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>IBM866_INIT,
<span class="kw-2">&amp;</span>MACINTOSH_INIT,
<span class="kw-2">&amp;</span>KOI8_R_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>BIG5_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>KOI8_R_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>IBM866_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1250_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1251_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1253_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1255_INIT,
<span class="kw-2">&amp;</span>BIG5_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1256_INIT,
<span class="kw-2">&amp;</span>IBM866_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1257_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1258_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>EUC_JP_INIT,
<span class="kw-2">&amp;</span>KOI8_R_INIT,
<span class="kw-2">&amp;</span>KOI8_R_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>KOI8_U_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>GB18030_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>BIG5_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_I_INIT,
<span class="kw-2">&amp;</span>KOI8_R_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>KOI8_U_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1250_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1251_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1253_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1255_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>BIG5_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1256_INIT,
<span class="kw-2">&amp;</span>IBM866_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1257_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1258_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>UTF_16BE_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>EUC_JP_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_13_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>ISO_8859_14_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>MACINTOSH_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_13_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>ISO_8859_14_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>BIG5_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>ISO_8859_13_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_14_INIT,
<span class="kw-2">&amp;</span>WINDOWS_874_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_16_INIT,
<span class="kw-2">&amp;</span>ISO_8859_10_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>ISO_8859_15_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>UTF_16BE_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>MACINTOSH_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_I_INIT,
<span class="kw-2">&amp;</span>SHIFT_JIS_INIT,
<span class="kw-2">&amp;</span>MACINTOSH_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>ISO_2022_JP_INIT,
<span class="kw-2">&amp;</span>ISO_2022_JP_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1250_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1251_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1253_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1255_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1256_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1257_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1258_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_I_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>EUC_KR_INIT,
<span class="kw-2">&amp;</span>X_MAC_CYRILLIC_INIT,
<span class="kw-2">&amp;</span>X_USER_DEFINED_INIT,
<span class="kw-2">&amp;</span>GBK_INIT,
<span class="kw-2">&amp;</span>UTF_16LE_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1252_INIT,
<span class="kw-2">&amp;</span>ISO_8859_2_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>ISO_8859_3_INIT,
<span class="kw-2">&amp;</span>ISO_8859_4_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>WINDOWS_1254_INIT,
<span class="kw-2">&amp;</span>ISO_8859_7_INIT,
<span class="kw-2">&amp;</span>X_MAC_CYRILLIC_INIT,
<span class="kw-2">&amp;</span>REPLACEMENT_INIT,
<span class="kw-2">&amp;</span>ISO_8859_6_INIT,
<span class="kw-2">&amp;</span>ISO_8859_8_INIT,
<span class="kw-2">&amp;</span>UTF_8_INIT,
<span class="kw-2">&amp;</span>ISO_8859_5_INIT,
<span class="kw-2">&amp;</span>EUC_JP_INIT,
];
<span class="comment">// END GENERATED CODE
</span><span class="doccomment">/// An encoding as defined in the [Encoding Standard][1].
///
/// An _encoding_ defines a mapping from a `u8` sequence to a `char` sequence
/// and, in most cases, vice versa. Each encoding has a name, an output
/// encoding, and one or more labels.
///
/// _Labels_ are ASCII-case-insensitive strings that are used to identify an
/// encoding in formats and protocols. The _name_ of the encoding is the
/// preferred label in the case appropriate for returning from the
/// [`characterSet`][2] property of the `Document` DOM interface.
///
/// The _output encoding_ is the encoding used for form submission and URL
/// parsing on Web pages in the encoding. This is UTF-8 for the replacement,
/// UTF-16LE and UTF-16BE encodings and the encoding itself for other
/// encodings.
///
/// [1]: https://encoding.spec.whatwg.org/
/// [2]: https://dom.spec.whatwg.org/#dom-document-characterset
///
/// # Streaming vs. Non-Streaming
///
/// When you have the entire input in a single buffer, you can use the
/// methods [`decode()`][3], [`decode_with_bom_removal()`][3],
/// [`decode_without_bom_handling()`][5],
/// [`decode_without_bom_handling_and_without_replacement()`][6] and
/// [`encode()`][7]. (These methods are available to Rust callers only and are
/// not available in the C API.) Unlike the rest of the API available to Rust,
/// these methods perform heap allocations. You should the `Decoder` and
/// `Encoder` objects when your input is split into multiple buffers or when
/// you want to control the allocation of the output buffers.
///
/// [3]: #method.decode
/// [4]: #method.decode_with_bom_removal
/// [5]: #method.decode_without_bom_handling
/// [6]: #method.decode_without_bom_handling_and_without_replacement
/// [7]: #method.encode
///
/// # Instances
///
/// All instances of `Encoding` are statically allocated and have the `&#39;static`
/// lifetime. There is precisely one unique `Encoding` instance for each
/// encoding defined in the Encoding Standard.
///
/// To obtain a reference to a particular encoding whose identity you know at
/// compile time, use a `static` that refers to encoding. There is a `static`
/// for each encoding. The `static`s are named in all caps with hyphens
/// replaced with underscores (and in C/C++ have `_ENCODING` appended to the
/// name). For example, if you know at compile time that you will want to
/// decode using the UTF-8 encoding, use the `UTF_8` `static` (`UTF_8_ENCODING`
/// in C/C++).
///
/// Additionally, there are non-reference-typed forms ending with `_INIT` to
/// work around the problem that `static`s of the type `&amp;&#39;static Encoding`
/// cannot be used to initialize items of an array whose type is
/// `[&amp;&#39;static Encoding; N]`.
///
/// If you don&#39;t know what encoding you need at compile time and need to
/// dynamically get an encoding by label, use
/// &lt;code&gt;Encoding::&lt;a href=&quot;#method.for_label&quot;&gt;for_label&lt;/a&gt;(&lt;var&gt;label&lt;/var&gt;)&lt;/code&gt;.
///
/// Instances of `Encoding` can be compared with `==` (in both Rust and in
/// C/C++).
</span><span class="kw">pub struct </span>Encoding {
name: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str,
variant: VariantEncoding,
}
<span class="kw">impl </span>Encoding {
<span class="doccomment">/// Implements the
/// [_get an encoding_](https://encoding.spec.whatwg.org/#concept-encoding-get)
/// algorithm.
///
/// If, after ASCII-lowercasing and removing leading and trailing
/// whitespace, the argument matches a label defined in the Encoding
/// Standard, `Some(&amp;&#39;static Encoding)` representing the corresponding
/// encoding is returned. If there is no match, `None` is returned.
///
/// This is the right method to use if the action upon the method returning
/// `None` is to use a fallback encoding (e.g. `WINDOWS_1252`) instead.
/// When the action upon the method returning `None` is not to proceed with
/// a fallback but to refuse processing, `for_label_no_replacement()` is more
/// appropriate.
///
/// The argument is of type `&amp;[u8]` instead of `&amp;str` to save callers
/// that are extracting the label from a non-UTF-8 protocol the trouble
/// of conversion to UTF-8. (If you have a `&amp;str`, just call `.as_bytes()`
/// on it.)
///
/// Available via the C wrapper.
///
/// # Example
/// ```
/// use encoding_rs::Encoding;
///
/// assert_eq!(Some(encoding_rs::UTF_8), Encoding::for_label(b&quot;utf-8&quot;));
/// assert_eq!(Some(encoding_rs::UTF_8), Encoding::for_label(b&quot;unicode11utf8&quot;));
///
/// assert_eq!(Some(encoding_rs::ISO_8859_2), Encoding::for_label(b&quot;latin2&quot;));
///
/// assert_eq!(Some(encoding_rs::UTF_16BE), Encoding::for_label(b&quot;utf-16be&quot;));
///
/// assert_eq!(None, Encoding::for_label(b&quot;unrecognized label&quot;));
/// ```
</span><span class="kw">pub fn </span>for_label(label: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding&gt; {
<span class="kw">let </span><span class="kw-2">mut </span>trimmed = [<span class="number">0u8</span>; LONGEST_LABEL_LENGTH];
<span class="kw">let </span><span class="kw-2">mut </span>trimmed_pos = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>iter = label.into_iter();
<span class="comment">// before
</span><span class="kw">loop </span>{
<span class="kw">match </span>iter.next() {
<span class="prelude-val">None </span>=&gt; {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
<span class="prelude-val">Some</span>(byte) =&gt; {
<span class="comment">// The characters used in labels are:
// a-z (except q, but excluding it below seems excessive)
// 0-9
// . _ - :
</span><span class="kw">match </span><span class="kw-2">*</span>byte {
<span class="number">0x09u8 </span>| <span class="number">0x0Au8 </span>| <span class="number">0x0Cu8 </span>| <span class="number">0x0Du8 </span>| <span class="number">0x20u8 </span>=&gt; {
<span class="kw">continue</span>;
}
<span class="string">b&#39;A&#39;</span>..=<span class="string">b&#39;Z&#39; </span>=&gt; {
trimmed[trimmed_pos] = <span class="kw-2">*</span>byte + <span class="number">0x20u8</span>;
trimmed_pos = <span class="number">1usize</span>;
<span class="kw">break</span>;
}
<span class="string">b&#39;a&#39;</span>..=<span class="string">b&#39;z&#39; </span>| <span class="string">b&#39;0&#39;</span>..=<span class="string">b&#39;9&#39; </span>| <span class="string">b&#39;-&#39; </span>| <span class="string">b&#39;_&#39; </span>| <span class="string">b&#39;:&#39; </span>| <span class="string">b&#39;.&#39; </span>=&gt; {
trimmed[trimmed_pos] = <span class="kw-2">*</span>byte;
trimmed_pos = <span class="number">1usize</span>;
<span class="kw">break</span>;
}
<span class="kw">_ </span>=&gt; {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}
}
}
}
<span class="comment">// inside
</span><span class="kw">loop </span>{
<span class="kw">match </span>iter.next() {
<span class="prelude-val">None </span>=&gt; {
<span class="kw">break</span>;
}
<span class="prelude-val">Some</span>(byte) =&gt; {
<span class="kw">match </span><span class="kw-2">*</span>byte {
<span class="number">0x09u8 </span>| <span class="number">0x0Au8 </span>| <span class="number">0x0Cu8 </span>| <span class="number">0x0Du8 </span>| <span class="number">0x20u8 </span>=&gt; {
<span class="kw">break</span>;
}
<span class="string">b&#39;A&#39;</span>..=<span class="string">b&#39;Z&#39; </span>=&gt; {
<span class="kw">if </span>trimmed_pos == LONGEST_LABEL_LENGTH {
<span class="comment">// There&#39;s no encoding with a label this long
</span><span class="kw">return </span><span class="prelude-val">None</span>;
}
trimmed[trimmed_pos] = <span class="kw-2">*</span>byte + <span class="number">0x20u8</span>;
trimmed_pos += <span class="number">1usize</span>;
<span class="kw">continue</span>;
}
<span class="string">b&#39;a&#39;</span>..=<span class="string">b&#39;z&#39; </span>| <span class="string">b&#39;0&#39;</span>..=<span class="string">b&#39;9&#39; </span>| <span class="string">b&#39;-&#39; </span>| <span class="string">b&#39;_&#39; </span>| <span class="string">b&#39;:&#39; </span>| <span class="string">b&#39;.&#39; </span>=&gt; {
<span class="kw">if </span>trimmed_pos == LONGEST_LABEL_LENGTH {
<span class="comment">// There&#39;s no encoding with a label this long
</span><span class="kw">return </span><span class="prelude-val">None</span>;
}
trimmed[trimmed_pos] = <span class="kw-2">*</span>byte;
trimmed_pos += <span class="number">1usize</span>;
<span class="kw">continue</span>;
}
<span class="kw">_ </span>=&gt; {
<span class="kw">return </span><span class="prelude-val">None</span>;
}
}
}
}
}
<span class="comment">// after
</span><span class="kw">loop </span>{
<span class="kw">match </span>iter.next() {
<span class="prelude-val">None </span>=&gt; {
<span class="kw">break</span>;
}
<span class="prelude-val">Some</span>(byte) =&gt; {
<span class="kw">match </span><span class="kw-2">*</span>byte {
<span class="number">0x09u8 </span>| <span class="number">0x0Au8 </span>| <span class="number">0x0Cu8 </span>| <span class="number">0x0Du8 </span>| <span class="number">0x20u8 </span>=&gt; {
<span class="kw">continue</span>;
}
<span class="kw">_ </span>=&gt; {
<span class="comment">// There&#39;s no label with space in the middle
</span><span class="kw">return </span><span class="prelude-val">None</span>;
}
}
}
}
}
<span class="kw">let </span>candidate = <span class="kw-2">&amp;</span>trimmed[..trimmed_pos];
<span class="kw">match </span>LABELS_SORTED.binary_search_by(|probe| {
<span class="kw">let </span>bytes = probe.as_bytes();
<span class="kw">let </span>c = bytes.len().cmp(<span class="kw-2">&amp;</span>candidate.len());
<span class="kw">if </span>c != Ordering::Equal {
<span class="kw">return </span>c;
}
<span class="kw">let </span>probe_iter = bytes.iter().rev();
<span class="kw">let </span>candidate_iter = candidate.iter().rev();
probe_iter.cmp(candidate_iter)
}) {
<span class="prelude-val">Ok</span>(i) =&gt; <span class="prelude-val">Some</span>(ENCODINGS_IN_LABEL_SORT[i]),
<span class="prelude-val">Err</span>(<span class="kw">_</span>) =&gt; <span class="prelude-val">None</span>,
}
}
<span class="doccomment">/// This method behaves the same as `for_label()`, except when `for_label()`
/// would return `Some(REPLACEMENT)`, this method returns `None` instead.
///
/// This method is useful in scenarios where a fatal error is required
/// upon invalid label, because in those cases the caller typically wishes
/// to treat the labels that map to the replacement encoding as fatal
/// errors, too.
///
/// It is not OK to use this method when the action upon the method returning
/// `None` is to use a fallback encoding (e.g. `WINDOWS_1252`). In such a
/// case, the `for_label()` method should be used instead in order to avoid
/// unsafe fallback for labels that `for_label()` maps to `Some(REPLACEMENT)`.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>for_label_no_replacement(label: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding&gt; {
<span class="kw">match </span>Encoding::for_label(label) {
<span class="prelude-val">None </span>=&gt; <span class="prelude-val">None</span>,
<span class="prelude-val">Some</span>(encoding) =&gt; {
<span class="kw">if </span>encoding == REPLACEMENT {
<span class="prelude-val">None
</span>} <span class="kw">else </span>{
<span class="prelude-val">Some</span>(encoding)
}
}
}
}
<span class="doccomment">/// Performs non-incremental BOM sniffing.
///
/// The argument must either be a buffer representing the entire input
/// stream (non-streaming case) or a buffer representing at least the first
/// three bytes of the input stream (streaming case).
///
/// Returns `Some((UTF_8, 3))`, `Some((UTF_16LE, 2))` or
/// `Some((UTF_16BE, 2))` if the argument starts with the UTF-8, UTF-16LE
/// or UTF-16BE BOM or `None` otherwise.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>for_bom(buffer: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, usize)&gt; {
<span class="kw">if </span>buffer.starts_with(<span class="string">b&quot;\xEF\xBB\xBF&quot;</span>) {
<span class="prelude-val">Some</span>((UTF_8, <span class="number">3</span>))
} <span class="kw">else if </span>buffer.starts_with(<span class="string">b&quot;\xFF\xFE&quot;</span>) {
<span class="prelude-val">Some</span>((UTF_16LE, <span class="number">2</span>))
} <span class="kw">else if </span>buffer.starts_with(<span class="string">b&quot;\xFE\xFF&quot;</span>) {
<span class="prelude-val">Some</span>((UTF_16BE, <span class="number">2</span>))
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
}
<span class="doccomment">/// Returns the name of this encoding.
///
/// This name is appropriate to return as-is from the DOM
/// `document.characterSet` property.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>name(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>str {
<span class="self">self</span>.name
}
<span class="doccomment">/// Checks whether the _output encoding_ of this encoding can encode every
/// `char`. (Only true if the output encoding is UTF-8.)
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>can_encode_everything(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; bool {
<span class="self">self</span>.output_encoding() == UTF_8
}
<span class="doccomment">/// Checks whether the bytes 0x00...0x7F map exclusively to the characters
/// U+0000...U+007F and vice versa.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>is_ascii_compatible(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; bool {
!(<span class="self">self </span>== REPLACEMENT || <span class="self">self </span>== UTF_16BE || <span class="self">self </span>== UTF_16LE || <span class="self">self </span>== ISO_2022_JP)
}
<span class="doccomment">/// Checks whether this encoding maps one byte to one Basic Multilingual
/// Plane code point (i.e. byte length equals decoded UTF-16 length) and
/// vice versa (for mappable characters).
///
/// `true` iff this encoding is on the list of [Legacy single-byte
/// encodings](https://encoding.spec.whatwg.org/#legacy-single-byte-encodings)
/// in the spec or x-user-defined.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>is_single_byte(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; bool {
<span class="self">self</span>.variant.is_single_byte()
}
<span class="doccomment">/// Checks whether the bytes 0x00...0x7F map mostly to the characters
/// U+0000...U+007F and vice versa.
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[inline]
</span><span class="kw">fn </span>is_potentially_borrowable(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; bool {
!(<span class="self">self </span>== REPLACEMENT || <span class="self">self </span>== UTF_16BE || <span class="self">self </span>== UTF_16LE)
}
<span class="doccomment">/// Returns the _output encoding_ of this encoding. This is UTF-8 for
/// UTF-16BE, UTF-16LE, and replacement and the encoding itself otherwise.
///
/// _Note:_ The _output encoding_ concept is needed for form submission and
/// error handling in the query strings of URLs in the Web Platform.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>output_encoding(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding {
<span class="kw">if </span><span class="self">self </span>== REPLACEMENT || <span class="self">self </span>== UTF_16BE || <span class="self">self </span>== UTF_16LE {
UTF_8
} <span class="kw">else </span>{
<span class="self">self
</span>}
}
<span class="doccomment">/// Decode complete input to `Cow&lt;&#39;a, str&gt;` _with BOM sniffing_ and with
/// malformed sequences replaced with the REPLACEMENT CHARACTER when the
/// entire input is available as a single buffer (i.e. the end of the
/// buffer marks the end of the stream).
///
/// The BOM, if any, does not appear in the output.
///
/// This method implements the (non-streaming version of) the
/// [_decode_](https://encoding.spec.whatwg.org/#decode) spec concept.
///
/// The second item in the returned tuple is the encoding that was actually
/// used (which may differ from this encoding thanks to BOM sniffing).
///
/// The third item in the returned tuple indicates whether there were
/// malformed sequences (that were replaced with the REPLACEMENT CHARACTER).
///
/// _Note:_ It is wrong to use this when the input buffer represents only
/// a segment of the input instead of the whole input. Use `new_decoder()`
/// when decoding segmented input.
///
/// This method performs a one or two heap allocations for the backing
/// buffer of the `String` when unable to borrow. (One allocation if not
/// errors and potentially another one in the presence of errors.) The
/// first allocation assumes jemalloc and may not be optimal with
/// allocators that do not use power-of-two buckets. A borrow is performed
/// if decoding UTF-8 and the input is valid UTF-8, if decoding an
/// ASCII-compatible encoding and the input is ASCII-only, or when decoding
/// ISO-2022-JP and the input is entirely in the ASCII state without state
/// transitions.
///
/// # Panics
///
/// If the size calculation for a heap-allocated backing buffer overflows
/// `usize`.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[inline]
</span><span class="kw">pub fn </span>decode&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>, bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]) -&gt; (Cow&lt;<span class="lifetime">&#39;a</span>, str&gt;, <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, bool) {
<span class="kw">let </span>(encoding, without_bom) = <span class="kw">match </span>Encoding::for_bom(bytes) {
<span class="prelude-val">Some</span>((encoding, bom_length)) =&gt; (encoding, <span class="kw-2">&amp;</span>bytes[bom_length..]),
<span class="prelude-val">None </span>=&gt; (<span class="self">self</span>, bytes),
};
<span class="kw">let </span>(cow, had_errors) = encoding.decode_without_bom_handling(without_bom);
(cow, encoding, had_errors)
}
<span class="doccomment">/// Decode complete input to `Cow&lt;&#39;a, str&gt;` _with BOM removal_ and with
/// malformed sequences replaced with the REPLACEMENT CHARACTER when the
/// entire input is available as a single buffer (i.e. the end of the
/// buffer marks the end of the stream).
///
/// Only an initial byte sequence that is a BOM for this encoding is removed.
///
/// When invoked on `UTF_8`, this method implements the (non-streaming
/// version of) the
/// [_UTF-8 decode_](https://encoding.spec.whatwg.org/#utf-8-decode) spec
/// concept.
///
/// The second item in the returned pair indicates whether there were
/// malformed sequences (that were replaced with the REPLACEMENT CHARACTER).
///
/// _Note:_ It is wrong to use this when the input buffer represents only
/// a segment of the input instead of the whole input. Use
/// `new_decoder_with_bom_removal()` when decoding segmented input.
///
/// This method performs a one or two heap allocations for the backing
/// buffer of the `String` when unable to borrow. (One allocation if not
/// errors and potentially another one in the presence of errors.) The
/// first allocation assumes jemalloc and may not be optimal with
/// allocators that do not use power-of-two buckets. A borrow is performed
/// if decoding UTF-8 and the input is valid UTF-8, if decoding an
/// ASCII-compatible encoding and the input is ASCII-only, or when decoding
/// ISO-2022-JP and the input is entirely in the ASCII state without state
/// transitions.
///
/// # Panics
///
/// If the size calculation for a heap-allocated backing buffer overflows
/// `usize`.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[inline]
</span><span class="kw">pub fn </span>decode_with_bom_removal&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>, bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]) -&gt; (Cow&lt;<span class="lifetime">&#39;a</span>, str&gt;, bool) {
<span class="kw">let </span>without_bom = <span class="kw">if </span><span class="self">self </span>== UTF_8 &amp;&amp; bytes.starts_with(<span class="string">b&quot;\xEF\xBB\xBF&quot;</span>) {
<span class="kw-2">&amp;</span>bytes[<span class="number">3</span>..]
} <span class="kw">else if </span>(<span class="self">self </span>== UTF_16LE &amp;&amp; bytes.starts_with(<span class="string">b&quot;\xFF\xFE&quot;</span>))
|| (<span class="self">self </span>== UTF_16BE &amp;&amp; bytes.starts_with(<span class="string">b&quot;\xFE\xFF&quot;</span>))
{
<span class="kw-2">&amp;</span>bytes[<span class="number">2</span>..]
} <span class="kw">else </span>{
bytes
};
<span class="self">self</span>.decode_without_bom_handling(without_bom)
}
<span class="doccomment">/// Decode complete input to `Cow&lt;&#39;a, str&gt;` _without BOM handling_ and
/// with malformed sequences replaced with the REPLACEMENT CHARACTER when
/// the entire input is available as a single buffer (i.e. the end of the
/// buffer marks the end of the stream).
///
/// When invoked on `UTF_8`, this method implements the (non-streaming
/// version of) the
/// [_UTF-8 decode without BOM_](https://encoding.spec.whatwg.org/#utf-8-decode-without-bom)
/// spec concept.
///
/// The second item in the returned pair indicates whether there were
/// malformed sequences (that were replaced with the REPLACEMENT CHARACTER).
///
/// _Note:_ It is wrong to use this when the input buffer represents only
/// a segment of the input instead of the whole input. Use
/// `new_decoder_without_bom_handling()` when decoding segmented input.
///
/// This method performs a one or two heap allocations for the backing
/// buffer of the `String` when unable to borrow. (One allocation if not
/// errors and potentially another one in the presence of errors.) The
/// first allocation assumes jemalloc and may not be optimal with
/// allocators that do not use power-of-two buckets. A borrow is performed
/// if decoding UTF-8 and the input is valid UTF-8, if decoding an
/// ASCII-compatible encoding and the input is ASCII-only, or when decoding
/// ISO-2022-JP and the input is entirely in the ASCII state without state
/// transitions.
///
/// # Panics
///
/// If the size calculation for a heap-allocated backing buffer overflows
/// `usize`.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>decode_without_bom_handling&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>, bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8]) -&gt; (Cow&lt;<span class="lifetime">&#39;a</span>, str&gt;, bool) {
<span class="kw">let </span>(<span class="kw-2">mut </span>decoder, <span class="kw-2">mut </span>string, <span class="kw-2">mut </span>total_read) = <span class="kw">if </span><span class="self">self</span>.is_potentially_borrowable() {
<span class="kw">let </span>valid_up_to = <span class="kw">if </span><span class="self">self </span>== UTF_8 {
utf8_valid_up_to(bytes)
} <span class="kw">else if </span><span class="self">self </span>== ISO_2022_JP {
iso_2022_jp_ascii_valid_up_to(bytes)
} <span class="kw">else </span>{
ascii_valid_up_to(bytes)
};
<span class="kw">if </span>valid_up_to == bytes.len() {
<span class="kw">let </span>str: <span class="kw-2">&amp;</span>str = <span class="kw">unsafe </span>{ core::str::from_utf8_unchecked(bytes) };
<span class="kw">return </span>(Cow::Borrowed(str), <span class="bool-val">false</span>);
}
<span class="kw">let </span>decoder = <span class="self">self</span>.new_decoder_without_bom_handling();
<span class="kw">let </span>rounded_without_replacement = checked_next_power_of_two(checked_add(
valid_up_to,
decoder.max_utf8_buffer_length_without_replacement(bytes.len() - valid_up_to),
));
<span class="kw">let </span>with_replacement = checked_add(
valid_up_to,
decoder.max_utf8_buffer_length(bytes.len() - valid_up_to),
);
<span class="kw">let </span><span class="kw-2">mut </span>string = String::with_capacity(
checked_min(rounded_without_replacement, with_replacement).unwrap(),
);
<span class="kw">unsafe </span>{
<span class="kw">let </span>vec = string.as_mut_vec();
vec.set_len(valid_up_to);
core::ptr::copy_nonoverlapping(bytes.as_ptr(), vec.as_mut_ptr(), valid_up_to);
}
(decoder, string, valid_up_to)
} <span class="kw">else </span>{
<span class="kw">let </span>decoder = <span class="self">self</span>.new_decoder_without_bom_handling();
<span class="kw">let </span>rounded_without_replacement = checked_next_power_of_two(
decoder.max_utf8_buffer_length_without_replacement(bytes.len()),
);
<span class="kw">let </span>with_replacement = decoder.max_utf8_buffer_length(bytes.len());
<span class="kw">let </span>string = String::with_capacity(
checked_min(rounded_without_replacement, with_replacement).unwrap(),
);
(decoder, string, <span class="number">0</span>)
};
<span class="kw">let </span><span class="kw-2">mut </span>total_had_errors = <span class="bool-val">false</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, had_errors) =
decoder.decode_to_string(<span class="kw-2">&amp;</span>bytes[total_read..], <span class="kw-2">&amp;mut </span>string, <span class="bool-val">true</span>);
total_read += read;
total_had_errors |= had_errors;
<span class="kw">match </span>result {
CoderResult::InputEmpty =&gt; {
<span class="macro">debug_assert_eq!</span>(total_read, bytes.len());
<span class="kw">return </span>(Cow::Owned(string), total_had_errors);
}
CoderResult::OutputFull =&gt; {
<span class="comment">// Allocate for the worst case. That is, we should come
// here at most once per invocation of this method.
</span><span class="kw">let </span>needed = decoder.max_utf8_buffer_length(bytes.len() - total_read);
string.reserve(needed.unwrap());
}
}
}
}
<span class="doccomment">/// Decode complete input to `Cow&lt;&#39;a, str&gt;` _without BOM handling_ and
/// _with malformed sequences treated as fatal_ when the entire input is
/// available as a single buffer (i.e. the end of the buffer marks the end
/// of the stream).
///
/// When invoked on `UTF_8`, this method implements the (non-streaming
/// version of) the
/// [_UTF-8 decode without BOM or fail_](https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail)
/// spec concept.
///
/// Returns `None` if a malformed sequence was encountered and the result
/// of the decode as `Some(String)` otherwise.
///
/// _Note:_ It is wrong to use this when the input buffer represents only
/// a segment of the input instead of the whole input. Use
/// `new_decoder_without_bom_handling()` when decoding segmented input.
///
/// This method performs a single heap allocation for the backing
/// buffer of the `String` when unable to borrow. A borrow is performed if
/// decoding UTF-8 and the input is valid UTF-8, if decoding an
/// ASCII-compatible encoding and the input is ASCII-only, or when decoding
/// ISO-2022-JP and the input is entirely in the ASCII state without state
/// transitions.
///
/// # Panics
///
/// If the size calculation for a heap-allocated backing buffer overflows
/// `usize`.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>decode_without_bom_handling_and_without_replacement&lt;<span class="lifetime">&#39;a</span>&gt;(
<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>,
bytes: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>[u8],
) -&gt; <span class="prelude-ty">Option</span>&lt;Cow&lt;<span class="lifetime">&#39;a</span>, str&gt;&gt; {
<span class="kw">if </span><span class="self">self </span>== UTF_8 {
<span class="kw">let </span>valid_up_to = utf8_valid_up_to(bytes);
<span class="kw">if </span>valid_up_to == bytes.len() {
<span class="kw">let </span>str: <span class="kw-2">&amp;</span>str = <span class="kw">unsafe </span>{ core::str::from_utf8_unchecked(bytes) };
<span class="kw">return </span><span class="prelude-val">Some</span>(Cow::Borrowed(str));
}
<span class="kw">return </span><span class="prelude-val">None</span>;
}
<span class="kw">let </span>(<span class="kw-2">mut </span>decoder, <span class="kw-2">mut </span>string, input) = <span class="kw">if </span><span class="self">self</span>.is_potentially_borrowable() {
<span class="kw">let </span>valid_up_to = <span class="kw">if </span><span class="self">self </span>== ISO_2022_JP {
iso_2022_jp_ascii_valid_up_to(bytes)
} <span class="kw">else </span>{
ascii_valid_up_to(bytes)
};
<span class="kw">if </span>valid_up_to == bytes.len() {
<span class="kw">let </span>str: <span class="kw-2">&amp;</span>str = <span class="kw">unsafe </span>{ core::str::from_utf8_unchecked(bytes) };
<span class="kw">return </span><span class="prelude-val">Some</span>(Cow::Borrowed(str));
}
<span class="kw">let </span>decoder = <span class="self">self</span>.new_decoder_without_bom_handling();
<span class="kw">let </span><span class="kw-2">mut </span>string = String::with_capacity(
checked_add(
valid_up_to,
decoder.max_utf8_buffer_length_without_replacement(bytes.len() - valid_up_to),
)
.unwrap(),
);
<span class="kw">unsafe </span>{
<span class="kw">let </span>vec = string.as_mut_vec();
vec.set_len(valid_up_to);
core::ptr::copy_nonoverlapping(bytes.as_ptr(), vec.as_mut_ptr(), valid_up_to);
}
(decoder, string, <span class="kw-2">&amp;</span>bytes[valid_up_to..])
} <span class="kw">else </span>{
<span class="kw">let </span>decoder = <span class="self">self</span>.new_decoder_without_bom_handling();
<span class="kw">let </span>string = String::with_capacity(
decoder
.max_utf8_buffer_length_without_replacement(bytes.len())
.unwrap(),
);
(decoder, string, bytes)
};
<span class="kw">let </span>(result, read) = decoder.decode_to_string_without_replacement(input, <span class="kw-2">&amp;mut </span>string, <span class="bool-val">true</span>);
<span class="kw">match </span>result {
DecoderResult::InputEmpty =&gt; {
<span class="macro">debug_assert_eq!</span>(read, input.len());
<span class="prelude-val">Some</span>(Cow::Owned(string))
}
DecoderResult::Malformed(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; <span class="prelude-val">None</span>,
DecoderResult::OutputFull =&gt; <span class="macro">unreachable!</span>(),
}
}
<span class="doccomment">/// Encode complete input to `Cow&lt;&#39;a, [u8]&gt;` using the
/// [_output encoding_](Encoding::output_encoding) of this encoding with
/// unmappable characters replaced with decimal numeric character references
/// when the entire input is available as a single buffer (i.e. the end of
/// the buffer marks the end of the stream).
///
/// This method implements the (non-streaming version of) the
/// [_encode_](https://encoding.spec.whatwg.org/#encode) spec concept. For
/// the [_UTF-8 encode_](https://encoding.spec.whatwg.org/#utf-8-encode)
/// spec concept, it is slightly more efficient to use
/// &lt;code&gt;&lt;var&gt;string&lt;/var&gt;.as_bytes()&lt;/code&gt; instead of invoking this
/// method on `UTF_8`.
///
/// The second item in the returned tuple is the encoding that was actually
/// used (*which may differ from this encoding thanks to some encodings
/// having UTF-8 as their output encoding*).
///
/// The third item in the returned tuple indicates whether there were
/// unmappable characters (that were replaced with HTML numeric character
/// references).
///
/// _Note:_ It is wrong to use this when the input buffer represents only
/// a segment of the input instead of the whole input. Use `new_encoder()`
/// when encoding segmented output.
///
/// When encoding to UTF-8 or when encoding an ASCII-only input to a
/// ASCII-compatible encoding, this method returns a borrow of the input
/// without a heap allocation. Otherwise, this method performs a single
/// heap allocation for the backing buffer of the `Vec&lt;u8&gt;` if there are no
/// unmappable characters and potentially multiple heap allocations if
/// there are. These allocations are tuned for jemalloc and may not be
/// optimal when using a different allocator that doesn&#39;t use power-of-two
/// buckets.
///
/// # Panics
///
/// If the size calculation for a heap-allocated backing buffer overflows
/// `usize`.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>encode&lt;<span class="lifetime">&#39;a</span>&gt;(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>, string: <span class="kw-2">&amp;</span><span class="lifetime">&#39;a </span>str) -&gt; (Cow&lt;<span class="lifetime">&#39;a</span>, [u8]&gt;, <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, bool) {
<span class="kw">let </span>output_encoding = <span class="self">self</span>.output_encoding();
<span class="kw">if </span>output_encoding == UTF_8 {
<span class="kw">return </span>(Cow::Borrowed(string.as_bytes()), output_encoding, <span class="bool-val">false</span>);
}
<span class="macro">debug_assert!</span>(output_encoding.is_potentially_borrowable());
<span class="kw">let </span>bytes = string.as_bytes();
<span class="kw">let </span>valid_up_to = <span class="kw">if </span>output_encoding == ISO_2022_JP {
iso_2022_jp_ascii_valid_up_to(bytes)
} <span class="kw">else </span>{
ascii_valid_up_to(bytes)
};
<span class="kw">if </span>valid_up_to == bytes.len() {
<span class="kw">return </span>(Cow::Borrowed(bytes), output_encoding, <span class="bool-val">false</span>);
}
<span class="kw">let </span><span class="kw-2">mut </span>encoder = output_encoding.new_encoder();
<span class="kw">let </span><span class="kw-2">mut </span>vec: Vec&lt;u8&gt; = Vec::with_capacity(
(checked_add(
valid_up_to,
encoder.max_buffer_length_from_utf8_if_no_unmappables(string.len() - valid_up_to),
))
.unwrap()
.next_power_of_two(),
);
<span class="kw">unsafe </span>{
vec.set_len(valid_up_to);
core::ptr::copy_nonoverlapping(bytes.as_ptr(), vec.as_mut_ptr(), valid_up_to);
}
<span class="kw">let </span><span class="kw-2">mut </span>total_read = valid_up_to;
<span class="kw">let </span><span class="kw-2">mut </span>total_had_errors = <span class="bool-val">false</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, had_errors) =
encoder.encode_from_utf8_to_vec(<span class="kw-2">&amp;</span>string[total_read..], <span class="kw-2">&amp;mut </span>vec, <span class="bool-val">true</span>);
total_read += read;
total_had_errors |= had_errors;
<span class="kw">match </span>result {
CoderResult::InputEmpty =&gt; {
<span class="macro">debug_assert_eq!</span>(total_read, string.len());
<span class="kw">return </span>(Cow::Owned(vec), output_encoding, total_had_errors);
}
CoderResult::OutputFull =&gt; {
<span class="comment">// reserve_exact wants to know how much more on top of current
// length--not current capacity.
</span><span class="kw">let </span>needed = encoder
.max_buffer_length_from_utf8_if_no_unmappables(string.len() - total_read);
<span class="kw">let </span>rounded = (checked_add(vec.capacity(), needed))
.unwrap()
.next_power_of_two();
<span class="kw">let </span>additional = rounded - vec.len();
vec.reserve_exact(additional);
}
}
}
}
<span class="kw">fn </span>new_variant_decoder(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; VariantDecoder {
<span class="self">self</span>.variant.new_variant_decoder()
}
<span class="doccomment">/// Instantiates a new decoder for this encoding with BOM sniffing enabled.
///
/// BOM sniffing may cause the returned decoder to morph into a decoder
/// for UTF-8, UTF-16LE or UTF-16BE instead of this encoding. The BOM
/// does not appear in the output.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>new_decoder(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; Decoder {
Decoder::new(<span class="self">self</span>, <span class="self">self</span>.new_variant_decoder(), BomHandling::Sniff)
}
<span class="doccomment">/// Instantiates a new decoder for this encoding with BOM removal.
///
/// If the input starts with bytes that are the BOM for this encoding,
/// those bytes are removed. However, the decoder never morphs into a
/// decoder for another encoding: A BOM for another encoding is treated as
/// (potentially malformed) input to the decoding algorithm for this
/// encoding.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>new_decoder_with_bom_removal(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; Decoder {
Decoder::new(<span class="self">self</span>, <span class="self">self</span>.new_variant_decoder(), BomHandling::Remove)
}
<span class="doccomment">/// Instantiates a new decoder for this encoding with BOM handling disabled.
///
/// If the input starts with bytes that look like a BOM, those bytes are
/// not treated as a BOM. (Hence, the decoder never morphs into a decoder
/// for another encoding.)
///
/// _Note:_ If the caller has performed BOM sniffing on its own but has not
/// removed the BOM, the caller should use `new_decoder_with_bom_removal()`
/// instead of this method to cause the BOM to be removed.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>new_decoder_without_bom_handling(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; Decoder {
Decoder::new(<span class="self">self</span>, <span class="self">self</span>.new_variant_decoder(), BomHandling::Off)
}
<span class="doccomment">/// Instantiates a new encoder for the [_output encoding_](Encoding::output_encoding)
/// of this encoding.
///
/// _Note:_ The output encoding of UTF-16BE, UTF-16LE, and replacement is UTF-8. There
/// is no encoder for UTF-16BE, UTF-16LE, and replacement themselves.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>new_encoder(<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span><span class="self">self</span>) -&gt; Encoder {
<span class="kw">let </span>enc = <span class="self">self</span>.output_encoding();
enc.variant.new_encoder(enc)
}
<span class="doccomment">/// Validates UTF-8.
///
/// Returns the index of the first byte that makes the input malformed as
/// UTF-8 or the length of the slice if the slice is entirely valid.
///
/// This is currently faster than the corresponding standard library
/// functionality. If this implementation gets upstreamed to the standard
/// library, this method may be removed in the future.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>utf8_valid_up_to(bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; usize {
utf8_valid_up_to(bytes)
}
<span class="doccomment">/// Validates ASCII.
///
/// Returns the index of the first byte that makes the input malformed as
/// ASCII or the length of the slice if the slice is entirely valid.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>ascii_valid_up_to(bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; usize {
ascii_valid_up_to(bytes)
}
<span class="doccomment">/// Validates ISO-2022-JP ASCII-state data.
///
/// Returns the index of the first byte that makes the input not
/// representable in the ASCII state of ISO-2022-JP or the length of the
/// slice if the slice is entirely representable in the ASCII state of
/// ISO-2022-JP.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>iso_2022_jp_ascii_valid_up_to(bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; usize {
iso_2022_jp_ascii_valid_up_to(bytes)
}
}
<span class="kw">impl </span>PartialEq <span class="kw">for </span>Encoding {
<span class="attribute">#[inline]
</span><span class="kw">fn </span>eq(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span>Encoding) -&gt; bool {
(<span class="self">self </span><span class="kw">as </span><span class="kw-2">*const </span>Encoding) == (other <span class="kw">as </span><span class="kw-2">*const </span>Encoding)
}
}
<span class="kw">impl </span>Eq <span class="kw">for </span>Encoding {}
<span class="attribute">#[cfg(test)]
</span><span class="kw">impl </span>PartialOrd <span class="kw">for </span>Encoding {
<span class="kw">fn </span>partial_cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span><span class="self">Self</span>) -&gt; <span class="prelude-ty">Option</span>&lt;Ordering&gt; {
(<span class="self">self </span><span class="kw">as </span><span class="kw-2">*const </span>Encoding <span class="kw">as </span>usize).partial_cmp(<span class="kw-2">&amp;</span>(other <span class="kw">as </span><span class="kw-2">*const </span>Encoding <span class="kw">as </span>usize))
}
}
<span class="attribute">#[cfg(test)]
</span><span class="kw">impl </span>Ord <span class="kw">for </span>Encoding {
<span class="kw">fn </span>cmp(<span class="kw-2">&amp;</span><span class="self">self</span>, other: <span class="kw-2">&amp;</span><span class="self">Self</span>) -&gt; Ordering {
(<span class="self">self </span><span class="kw">as </span><span class="kw-2">*const </span>Encoding <span class="kw">as </span>usize).cmp(<span class="kw-2">&amp;</span>(other <span class="kw">as </span><span class="kw-2">*const </span>Encoding <span class="kw">as </span>usize))
}
}
<span class="kw">impl </span>Hash <span class="kw">for </span>Encoding {
<span class="attribute">#[inline]
</span><span class="kw">fn </span>hash&lt;H: Hasher&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, state: <span class="kw-2">&amp;mut </span>H) {
(<span class="self">self </span><span class="kw">as </span><span class="kw-2">*const </span>Encoding).hash(state);
}
}
<span class="kw">impl </span>core::fmt::Debug <span class="kw">for </span>Encoding {
<span class="attribute">#[inline]
</span><span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>core::fmt::Formatter) -&gt; core::fmt::Result {
<span class="macro">write!</span>(f, <span class="string">&quot;Encoding {{ {} }}&quot;</span>, <span class="self">self</span>.name)
}
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">impl </span>Serialize <span class="kw">for </span>Encoding {
<span class="attribute">#[inline]
</span><span class="kw">fn </span>serialize&lt;S&gt;(<span class="kw-2">&amp;</span><span class="self">self</span>, serializer: S) -&gt; <span class="prelude-ty">Result</span>&lt;S::Ok, S::Error&gt;
<span class="kw">where
</span>S: Serializer,
{
serializer.serialize_str(<span class="self">self</span>.name)
}
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">struct </span>EncodingVisitor;
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">impl</span>&lt;<span class="lifetime">&#39;de</span>&gt; Visitor&lt;<span class="lifetime">&#39;de</span>&gt; <span class="kw">for </span>EncodingVisitor {
<span class="kw">type </span>Value = <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding;
<span class="kw">fn </span>expecting(<span class="kw-2">&amp;</span><span class="self">self</span>, formatter: <span class="kw-2">&amp;mut </span>core::fmt::Formatter) -&gt; core::fmt::Result {
formatter.write_str(<span class="string">&quot;a valid encoding label&quot;</span>)
}
<span class="kw">fn </span>visit_str&lt;E&gt;(<span class="self">self</span>, value: <span class="kw-2">&amp;</span>str) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, E&gt;
<span class="kw">where
</span>E: serde::de::Error,
{
<span class="kw">if let </span><span class="prelude-val">Some</span>(enc) = Encoding::for_label(value.as_bytes()) {
<span class="prelude-val">Ok</span>(enc)
} <span class="kw">else </span>{
<span class="prelude-val">Err</span>(E::custom(<span class="macro">alloc::format!</span>(
<span class="string">&quot;invalid encoding label: {}&quot;</span>,
value
)))
}
}
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
</span><span class="kw">impl</span>&lt;<span class="lifetime">&#39;de</span>&gt; Deserialize&lt;<span class="lifetime">&#39;de</span>&gt; <span class="kw">for </span><span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding {
<span class="kw">fn </span>deserialize&lt;D&gt;(deserializer: D) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, D::Error&gt;
<span class="kw">where
</span>D: Deserializer&lt;<span class="lifetime">&#39;de</span>&gt;,
{
deserializer.deserialize_str(EncodingVisitor)
}
}
<span class="doccomment">/// Tracks the life cycle of a decoder from BOM sniffing to conversion to end.
</span><span class="attribute">#[derive(PartialEq, Debug, Copy, Clone)]
</span><span class="kw">enum </span>DecoderLifeCycle {
<span class="doccomment">/// The decoder has seen no input yet.
</span>AtStart,
<span class="doccomment">/// The decoder has seen no input yet but expects UTF-8.
</span>AtUtf8Start,
<span class="doccomment">/// The decoder has seen no input yet but expects UTF-16BE.
</span>AtUtf16BeStart,
<span class="doccomment">/// The decoder has seen no input yet but expects UTF-16LE.
</span>AtUtf16LeStart,
<span class="doccomment">/// The decoder has seen EF.
</span>SeenUtf8First,
<span class="doccomment">/// The decoder has seen EF, BB.
</span>SeenUtf8Second,
<span class="doccomment">/// The decoder has seen FE.
</span>SeenUtf16BeFirst,
<span class="doccomment">/// The decoder has seen FF.
</span>SeenUtf16LeFirst,
<span class="doccomment">/// Saw EF, BB but not BF, there was a buffer boundary after BB and the
/// underlying decoder reported EF as an error, so we need to remember to
/// push BB before the next buffer.
</span>ConvertingWithPendingBB,
<span class="doccomment">/// No longer looking for a BOM and EOF not yet seen.
</span>Converting,
<span class="doccomment">/// EOF has been seen.
</span>Finished,
}
<span class="doccomment">/// Communicate the BOM handling mode.
</span><span class="attribute">#[derive(Debug, Copy, Clone)]
</span><span class="kw">enum </span>BomHandling {
<span class="doccomment">/// Don&#39;t handle the BOM
</span>Off,
<span class="doccomment">/// Sniff for UTF-8, UTF-16BE or UTF-16LE BOM
</span>Sniff,
<span class="doccomment">/// Remove the BOM only if it&#39;s the BOM for this encoding
</span>Remove,
}
<span class="doccomment">/// Result of a (potentially partial) decode or encode operation with
/// replacement.
</span><span class="attribute">#[must_use]
#[derive(Debug, PartialEq, Eq)]
</span><span class="kw">pub enum </span>CoderResult {
<span class="doccomment">/// The input was exhausted.
///
/// If this result was returned from a call where `last` was `true`, the
/// conversion process has completed. Otherwise, the caller should call a
/// decode or encode method again with more input.
</span>InputEmpty,
<span class="doccomment">/// The converter cannot produce another unit of output, because the output
/// buffer does not have enough space left.
///
/// The caller must provide more output space upon the next call and re-push
/// the remaining input to the converter.
</span>OutputFull,
}
<span class="doccomment">/// Result of a (potentially partial) decode operation without replacement.
</span><span class="attribute">#[must_use]
#[derive(Debug, PartialEq, Eq)]
</span><span class="kw">pub enum </span>DecoderResult {
<span class="doccomment">/// The input was exhausted.
///
/// If this result was returned from a call where `last` was `true`, the
/// decoding process has completed. Otherwise, the caller should call a
/// decode method again with more input.
</span>InputEmpty,
<span class="doccomment">/// The decoder cannot produce another unit of output, because the output
/// buffer does not have enough space left.
///
/// The caller must provide more output space upon the next call and re-push
/// the remaining input to the decoder.
</span>OutputFull,
<span class="doccomment">/// The decoder encountered a malformed byte sequence.
///
/// The caller must either treat this as a fatal error or must append one
/// REPLACEMENT CHARACTER (U+FFFD) to the output and then re-push the
/// the remaining input to the decoder.
///
/// The first wrapped integer indicates the length of the malformed byte
/// sequence. The second wrapped integer indicates the number of bytes
/// that were consumed after the malformed sequence. If the second
/// integer is zero, the last byte that was consumed is the last byte of
/// the malformed sequence. Note that the malformed bytes may have been part
/// of an earlier input buffer.
///
/// The first wrapped integer can have values 1, 2, 3 or 4. The second
/// wrapped integer can have values 0, 1, 2 or 3. The worst-case sum
/// of the two is 6, which happens with ISO-2022-JP.
</span>Malformed(u8, u8), <span class="comment">// u8 instead of usize to avoid useless bloat
</span>}
<span class="doccomment">/// A converter that decodes a byte stream into Unicode according to a
/// character encoding in a streaming (incremental) manner.
///
/// The various `decode_*` methods take an input buffer (`src`) and an output
/// buffer `dst` both of which are caller-allocated. There are variants for
/// both UTF-8 and UTF-16 output buffers.
///
/// A `decode_*` method decodes bytes from `src` into Unicode characters stored
/// into `dst` until one of the following three things happens:
///
/// 1. A malformed byte sequence is encountered (`*_without_replacement`
/// variants only).
///
/// 2. The output buffer has been filled so near capacity that the decoder
/// cannot be sure that processing an additional byte of input wouldn&#39;t
/// cause so much output that the output buffer would overflow.
///
/// 3. All the input bytes have been processed.
///
/// The `decode_*` method then returns tuple of a status indicating which one
/// of the three reasons to return happened, how many input bytes were read,
/// how many output code units (`u8` when decoding into UTF-8 and `u16`
/// when decoding to UTF-16) were written (except when decoding into `String`,
/// whose length change indicates this), and in the case of the
/// variants performing replacement, a boolean indicating whether an error was
/// replaced with the REPLACEMENT CHARACTER during the call.
///
/// The number of bytes &quot;written&quot; is what&#39;s logically written. Garbage may be
/// written in the output buffer beyond the point logically written to.
/// Therefore, if you wish to decode into an `&amp;mut str`, you should use the
/// methods that take an `&amp;mut str` argument instead of the ones that take an
/// `&amp;mut [u8]` argument. The former take care of overwriting the trailing
/// garbage to ensure the UTF-8 validity of the `&amp;mut str` as a whole, but the
/// latter don&#39;t.
///
/// In the case of the `*_without_replacement` variants, the status is a
/// [`DecoderResult`][1] enumeration (possibilities `Malformed`, `OutputFull` and
/// `InputEmpty` corresponding to the three cases listed above).
///
/// In the case of methods whose name does not end with
/// `*_without_replacement`, malformed sequences are automatically replaced
/// with the REPLACEMENT CHARACTER and errors do not cause the methods to
/// return early.
///
/// When decoding to UTF-8, the output buffer must have at least 4 bytes of
/// space. When decoding to UTF-16, the output buffer must have at least two
/// UTF-16 code units (`u16`) of space.
///
/// When decoding to UTF-8 without replacement, the methods are guaranteed
/// not to return indicating that more output space is needed if the length
/// of the output buffer is at least the length returned by
/// [`max_utf8_buffer_length_without_replacement()`][2]. When decoding to UTF-8
/// with replacement, the length of the output buffer that guarantees the
/// methods not to return indicating that more output space is needed is given
/// by [`max_utf8_buffer_length()`][3]. When decoding to UTF-16 with
/// or without replacement, the length of the output buffer that guarantees
/// the methods not to return indicating that more output space is needed is
/// given by [`max_utf16_buffer_length()`][4].
///
/// The output written into `dst` is guaranteed to be valid UTF-8 or UTF-16,
/// and the output after each `decode_*` call is guaranteed to consist of
/// complete characters. (I.e. the code unit sequence for the last character is
/// guaranteed not to be split across output buffers.)
///
/// The boolean argument `last` indicates that the end of the stream is reached
/// when all the bytes in `src` have been consumed.
///
/// A `Decoder` object can be used to incrementally decode a byte stream.
///
/// During the processing of a single stream, the caller must call `decode_*`
/// zero or more times with `last` set to `false` and then call `decode_*` at
/// least once with `last` set to `true`. If `decode_*` returns `InputEmpty`,
/// the processing of the stream has ended. Otherwise, the caller must call
/// `decode_*` again with `last` set to `true` (or treat a `Malformed` result as
/// a fatal error).
///
/// Once the stream has ended, the `Decoder` object must not be used anymore.
/// That is, you need to create another one to process another stream.
///
/// When the decoder returns `OutputFull` or the decoder returns `Malformed` and
/// the caller does not wish to treat it as a fatal error, the input buffer
/// `src` may not have been completely consumed. In that case, the caller must
/// pass the unconsumed contents of `src` to `decode_*` again upon the next
/// call.
///
/// [1]: enum.DecoderResult.html
/// [2]: #method.max_utf8_buffer_length_without_replacement
/// [3]: #method.max_utf8_buffer_length
/// [4]: #method.max_utf16_buffer_length
///
/// # Infinite loops
///
/// When converting with a fixed-size output buffer whose size is too small to
/// accommodate one character or (when applicable) one numeric character
/// reference of output, an infinite loop ensues. When converting with a
/// fixed-size output buffer, it generally makes sense to make the buffer
/// fairly large (e.g. couple of kilobytes).
</span><span class="kw">pub struct </span>Decoder {
encoding: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding,
variant: VariantDecoder,
life_cycle: DecoderLifeCycle,
}
<span class="kw">impl </span>Decoder {
<span class="kw">fn </span>new(enc: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, decoder: VariantDecoder, sniffing: BomHandling) -&gt; Decoder {
Decoder {
encoding: enc,
variant: decoder,
life_cycle: <span class="kw">match </span>sniffing {
BomHandling::Off =&gt; DecoderLifeCycle::Converting,
BomHandling::Sniff =&gt; DecoderLifeCycle::AtStart,
BomHandling::Remove =&gt; {
<span class="kw">if </span>enc == UTF_8 {
DecoderLifeCycle::AtUtf8Start
} <span class="kw">else if </span>enc == UTF_16BE {
DecoderLifeCycle::AtUtf16BeStart
} <span class="kw">else if </span>enc == UTF_16LE {
DecoderLifeCycle::AtUtf16LeStart
} <span class="kw">else </span>{
DecoderLifeCycle::Converting
}
}
},
}
}
<span class="doccomment">/// The `Encoding` this `Decoder` is for.
///
/// BOM sniffing can change the return value of this method during the life
/// of the decoder.
///
/// Available via the C wrapper.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>encoding(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding {
<span class="self">self</span>.encoding
}
<span class="doccomment">/// Query the worst-case UTF-8 output size _with replacement_.
///
/// Returns the size of the output buffer in UTF-8 code units (`u8`)
/// that will not overflow given the current state of the decoder and
/// `byte_length` number of additional input bytes when decoding with
/// errors handled by outputting a REPLACEMENT CHARACTER for each malformed
/// sequence or `None` if `usize` would overflow.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_utf8_buffer_length(<span class="kw-2">&amp;</span><span class="self">self</span>, byte_length: usize) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="comment">// Need to consider a) the decoder morphing due to the BOM and b) a partial
// BOM getting pushed to the underlying decoder.
</span><span class="kw">match </span><span class="self">self</span>.life_cycle {
DecoderLifeCycle::Converting
| DecoderLifeCycle::AtUtf8Start
| DecoderLifeCycle::AtUtf16LeStart
| DecoderLifeCycle::AtUtf16BeStart =&gt; {
<span class="kw">return </span><span class="self">self</span>.variant.max_utf8_buffer_length(byte_length);
}
DecoderLifeCycle::AtStart =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = checked_add(<span class="number">3</span>, byte_length.checked_mul(<span class="number">3</span>)) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) = checked_add(
<span class="number">1</span>,
checked_mul(<span class="number">3</span>, checked_div(byte_length.checked_add(<span class="number">1</span>), <span class="number">2</span>)),
) {
<span class="kw">let </span>utf_bom = core::cmp::max(utf8_bom, utf16_bom);
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_8 || encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) =
<span class="self">self</span>.variant.max_utf8_buffer_length(byte_length)
{
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf_bom, non_bom));
}
}
}
}
DecoderLifeCycle::SeenUtf8First | DecoderLifeCycle::SeenUtf8Second =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = checked_add(<span class="number">3</span>, sum.checked_mul(<span class="number">3</span>)) {
<span class="kw">if </span><span class="self">self</span>.encoding() == UTF_8 {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf8_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) = <span class="self">self</span>.variant.max_utf8_buffer_length(sum) {
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf8_bom, non_bom));
}
}
}
}
DecoderLifeCycle::ConvertingWithPendingBB =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">return </span><span class="self">self</span>.variant.max_utf8_buffer_length(sum);
}
}
DecoderLifeCycle::SeenUtf16LeFirst | DecoderLifeCycle::SeenUtf16BeFirst =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) =
checked_add(<span class="number">1</span>, checked_mul(<span class="number">3</span>, checked_div(sum.checked_add(<span class="number">1</span>), <span class="number">2</span>)))
{
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf16_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) = <span class="self">self</span>.variant.max_utf8_buffer_length(sum) {
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf16_bom, non_bom));
}
}
}
}
DecoderLifeCycle::Finished =&gt; <span class="macro">panic!</span>(<span class="string">&quot;Must not use a decoder that has finished.&quot;</span>),
}
<span class="prelude-val">None
</span>}
<span class="doccomment">/// Query the worst-case UTF-8 output size _without replacement_.
///
/// Returns the size of the output buffer in UTF-8 code units (`u8`)
/// that will not overflow given the current state of the decoder and
/// `byte_length` number of additional input bytes when decoding without
/// replacement error handling or `None` if `usize` would overflow.
///
/// Note that this value may be too small for the `_with_replacement` case.
/// Use `max_utf8_buffer_length()` for that case.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_utf8_buffer_length_without_replacement(<span class="kw-2">&amp;</span><span class="self">self</span>, byte_length: usize) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="comment">// Need to consider a) the decoder morphing due to the BOM and b) a partial
// BOM getting pushed to the underlying decoder.
</span><span class="kw">match </span><span class="self">self</span>.life_cycle {
DecoderLifeCycle::Converting
| DecoderLifeCycle::AtUtf8Start
| DecoderLifeCycle::AtUtf16LeStart
| DecoderLifeCycle::AtUtf16BeStart =&gt; {
<span class="kw">return </span><span class="self">self
</span>.variant
.max_utf8_buffer_length_without_replacement(byte_length);
}
DecoderLifeCycle::AtStart =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = byte_length.checked_add(<span class="number">3</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) = checked_add(
<span class="number">1</span>,
checked_mul(<span class="number">3</span>, checked_div(byte_length.checked_add(<span class="number">1</span>), <span class="number">2</span>)),
) {
<span class="kw">let </span>utf_bom = core::cmp::max(utf8_bom, utf16_bom);
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_8 || encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) = <span class="self">self
</span>.variant
.max_utf8_buffer_length_without_replacement(byte_length)
{
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf_bom, non_bom));
}
}
}
}
DecoderLifeCycle::SeenUtf8First | DecoderLifeCycle::SeenUtf8Second =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = sum.checked_add(<span class="number">3</span>) {
<span class="kw">if </span><span class="self">self</span>.encoding() == UTF_8 {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf8_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) =
<span class="self">self</span>.variant.max_utf8_buffer_length_without_replacement(sum)
{
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf8_bom, non_bom));
}
}
}
}
DecoderLifeCycle::ConvertingWithPendingBB =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">return </span><span class="self">self</span>.variant.max_utf8_buffer_length_without_replacement(sum);
}
}
DecoderLifeCycle::SeenUtf16LeFirst | DecoderLifeCycle::SeenUtf16BeFirst =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) =
checked_add(<span class="number">1</span>, checked_mul(<span class="number">3</span>, checked_div(sum.checked_add(<span class="number">1</span>), <span class="number">2</span>)))
{
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf16_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) =
<span class="self">self</span>.variant.max_utf8_buffer_length_without_replacement(sum)
{
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf16_bom, non_bom));
}
}
}
}
DecoderLifeCycle::Finished =&gt; <span class="macro">panic!</span>(<span class="string">&quot;Must not use a decoder that has finished.&quot;</span>),
}
<span class="prelude-val">None
</span>}
<span class="doccomment">/// Incrementally decode a byte stream into UTF-8 with malformed sequences
/// replaced with the REPLACEMENT CHARACTER.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>decode_to_utf8(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>[u8],
last: bool,
) -&gt; (CoderResult, usize, usize, bool) {
<span class="kw">let </span><span class="kw-2">mut </span>had_errors = <span class="bool-val">false</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_read = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_written = <span class="number">0usize</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, written) = <span class="self">self</span>.decode_to_utf8_without_replacement(
<span class="kw-2">&amp;</span>src[total_read..],
<span class="kw-2">&amp;mut </span>dst[total_written..],
last,
);
total_read += read;
total_written += written;
<span class="kw">match </span>result {
DecoderResult::InputEmpty =&gt; {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_errors,
);
}
DecoderResult::OutputFull =&gt; {
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_errors,
);
}
DecoderResult::Malformed(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; {
had_errors = <span class="bool-val">true</span>;
<span class="comment">// There should always be space for the U+FFFD, because
// otherwise we&#39;d have gotten OutputFull already.
// XXX: is the above comment actually true for UTF-8 itself?
// TODO: Consider having fewer bound checks here.
</span>dst[total_written] = <span class="number">0xEFu8</span>;
total_written += <span class="number">1</span>;
dst[total_written] = <span class="number">0xBFu8</span>;
total_written += <span class="number">1</span>;
dst[total_written] = <span class="number">0xBDu8</span>;
total_written += <span class="number">1</span>;
}
}
}
}
<span class="doccomment">/// Incrementally decode a byte stream into UTF-8 with malformed sequences
/// replaced with the REPLACEMENT CHARACTER with type system signaling
/// of UTF-8 validity.
///
/// This methods calls `decode_to_utf8` and then zeroes
/// out up to three bytes that aren&#39;t logically part of the write in order
/// to retain the UTF-8 validity even for the unwritten part of the buffer.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available to Rust only.
</span><span class="kw">pub fn </span>decode_to_str(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>str,
last: bool,
) -&gt; (CoderResult, usize, usize, bool) {
<span class="kw">let </span>bytes: <span class="kw-2">&amp;mut </span>[u8] = <span class="kw">unsafe </span>{ dst.as_bytes_mut() };
<span class="kw">let </span>(result, read, written, replaced) = <span class="self">self</span>.decode_to_utf8(src, bytes, last);
<span class="kw">let </span>len = bytes.len();
<span class="kw">let </span><span class="kw-2">mut </span>trail = written;
<span class="comment">// Non-UTF-8 ASCII-compatible decoders may write up to `MAX_STRIDE_SIZE`
// bytes of trailing garbage. No need to optimize non-ASCII-compatible
// encodings to avoid overwriting here.
</span><span class="kw">if </span><span class="self">self</span>.encoding != UTF_8 {
<span class="kw">let </span>max = core::cmp::min(len, trail + ascii::MAX_STRIDE_SIZE);
<span class="kw">while </span>trail &lt; max {
bytes[trail] = <span class="number">0</span>;
trail += <span class="number">1</span>;
}
}
<span class="kw">while </span>trail &lt; len &amp;&amp; ((bytes[trail] &amp; <span class="number">0xC0</span>) == <span class="number">0x80</span>) {
bytes[trail] = <span class="number">0</span>;
trail += <span class="number">1</span>;
}
(result, read, written, replaced)
}
<span class="doccomment">/// Incrementally decode a byte stream into UTF-8 with malformed sequences
/// replaced with the REPLACEMENT CHARACTER using a `String` receiver.
///
/// Like the others, this method follows the logic that the output buffer is
/// caller-allocated. This method treats the capacity of the `String` as
/// the output limit. That is, this method guarantees not to cause a
/// reallocation of the backing buffer of `String`.
///
/// The return value is a tuple that contains the `DecoderResult`, the
/// number of bytes read and a boolean indicating whether replacements
/// were done. The number of bytes written is signaled via the length of
/// the `String` changing.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>decode_to_string(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>String,
last: bool,
) -&gt; (CoderResult, usize, bool) {
<span class="kw">unsafe </span>{
<span class="kw">let </span>vec = dst.as_mut_vec();
<span class="kw">let </span>old_len = vec.len();
<span class="kw">let </span>capacity = vec.capacity();
vec.set_len(capacity);
<span class="kw">let </span>(result, read, written, replaced) =
<span class="self">self</span>.decode_to_utf8(src, <span class="kw-2">&amp;mut </span>vec[old_len..], last);
vec.set_len(old_len + written);
(result, read, replaced)
}
}
<span class="macro">public_decode_function!</span>(<span class="doccomment">/// Incrementally decode a byte stream into UTF-8
/// _without replacement_.
///
/// See the documentation of the struct for
/// documentation for `decode_*` methods
/// collectively.
///
/// Available via the C wrapper.
</span>,
decode_to_utf8_without_replacement,
decode_to_utf8_raw,
decode_to_utf8_checking_end,
decode_to_utf8_after_one_potential_bom_byte,
decode_to_utf8_after_two_potential_bom_bytes,
decode_to_utf8_checking_end_with_offset,
u8);
<span class="doccomment">/// Incrementally decode a byte stream into UTF-8 with type system signaling
/// of UTF-8 validity.
///
/// This methods calls `decode_to_utf8` and then zeroes out up to three
/// bytes that aren&#39;t logically part of the write in order to retain the
/// UTF-8 validity even for the unwritten part of the buffer.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available to Rust only.
</span><span class="kw">pub fn </span>decode_to_str_without_replacement(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>str,
last: bool,
) -&gt; (DecoderResult, usize, usize) {
<span class="kw">let </span>bytes: <span class="kw-2">&amp;mut </span>[u8] = <span class="kw">unsafe </span>{ dst.as_bytes_mut() };
<span class="kw">let </span>(result, read, written) = <span class="self">self</span>.decode_to_utf8_without_replacement(src, bytes, last);
<span class="kw">let </span>len = bytes.len();
<span class="kw">let </span><span class="kw-2">mut </span>trail = written;
<span class="comment">// Non-UTF-8 ASCII-compatible decoders may write up to `MAX_STRIDE_SIZE`
// bytes of trailing garbage. No need to optimize non-ASCII-compatible
// encodings to avoid overwriting here.
</span><span class="kw">if </span><span class="self">self</span>.encoding != UTF_8 {
<span class="kw">let </span>max = core::cmp::min(len, trail + ascii::MAX_STRIDE_SIZE);
<span class="kw">while </span>trail &lt; max {
bytes[trail] = <span class="number">0</span>;
trail += <span class="number">1</span>;
}
}
<span class="kw">while </span>trail &lt; len &amp;&amp; ((bytes[trail] &amp; <span class="number">0xC0</span>) == <span class="number">0x80</span>) {
bytes[trail] = <span class="number">0</span>;
trail += <span class="number">1</span>;
}
(result, read, written)
}
<span class="doccomment">/// Incrementally decode a byte stream into UTF-8 using a `String` receiver.
///
/// Like the others, this method follows the logic that the output buffer is
/// caller-allocated. This method treats the capacity of the `String` as
/// the output limit. That is, this method guarantees not to cause a
/// reallocation of the backing buffer of `String`.
///
/// The return value is a pair that contains the `DecoderResult` and the
/// number of bytes read. The number of bytes written is signaled via
/// the length of the `String` changing.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>decode_to_string_without_replacement(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>String,
last: bool,
) -&gt; (DecoderResult, usize) {
<span class="kw">unsafe </span>{
<span class="kw">let </span>vec = dst.as_mut_vec();
<span class="kw">let </span>old_len = vec.len();
<span class="kw">let </span>capacity = vec.capacity();
vec.set_len(capacity);
<span class="kw">let </span>(result, read, written) =
<span class="self">self</span>.decode_to_utf8_without_replacement(src, <span class="kw-2">&amp;mut </span>vec[old_len..], last);
vec.set_len(old_len + written);
(result, read)
}
}
<span class="doccomment">/// Query the worst-case UTF-16 output size (with or without replacement).
///
/// Returns the size of the output buffer in UTF-16 code units (`u16`)
/// that will not overflow given the current state of the decoder and
/// `byte_length` number of additional input bytes or `None` if `usize`
/// would overflow.
///
/// Since the REPLACEMENT CHARACTER fits into one UTF-16 code unit, the
/// return value of this method applies also in the
/// `_without_replacement` case.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_utf16_buffer_length(<span class="kw-2">&amp;</span><span class="self">self</span>, byte_length: usize) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="comment">// Need to consider a) the decoder morphing due to the BOM and b) a partial
// BOM getting pushed to the underlying decoder.
</span><span class="kw">match </span><span class="self">self</span>.life_cycle {
DecoderLifeCycle::Converting
| DecoderLifeCycle::AtUtf8Start
| DecoderLifeCycle::AtUtf16LeStart
| DecoderLifeCycle::AtUtf16BeStart =&gt; {
<span class="kw">return </span><span class="self">self</span>.variant.max_utf16_buffer_length(byte_length);
}
DecoderLifeCycle::AtStart =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = byte_length.checked_add(<span class="number">1</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) =
checked_add(<span class="number">1</span>, checked_div(byte_length.checked_add(<span class="number">1</span>), <span class="number">2</span>))
{
<span class="kw">let </span>utf_bom = core::cmp::max(utf8_bom, utf16_bom);
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_8 || encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) =
<span class="self">self</span>.variant.max_utf16_buffer_length(byte_length)
{
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf_bom, non_bom));
}
}
}
}
DecoderLifeCycle::SeenUtf8First | DecoderLifeCycle::SeenUtf8Second =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf8_bom) = sum.checked_add(<span class="number">1</span>) {
<span class="kw">if </span><span class="self">self</span>.encoding() == UTF_8 {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf8_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) = <span class="self">self</span>.variant.max_utf16_buffer_length(sum) {
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf8_bom, non_bom));
}
}
}
}
DecoderLifeCycle::ConvertingWithPendingBB =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">return </span><span class="self">self</span>.variant.max_utf16_buffer_length(sum);
}
}
DecoderLifeCycle::SeenUtf16LeFirst | DecoderLifeCycle::SeenUtf16BeFirst =&gt; {
<span class="comment">// Add two bytes even when only one byte has been seen,
// because the one byte can become a lead byte in multibyte
// decoders, but only after the decoder has been queried
// for max length, so the decoder&#39;s own logic for adding
// one for a pending lead cannot work.
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(sum) = byte_length.checked_add(<span class="number">2</span>) {
<span class="kw">if let </span><span class="prelude-val">Some</span>(utf16_bom) = checked_add(<span class="number">1</span>, checked_div(sum.checked_add(<span class="number">1</span>), <span class="number">2</span>)) {
<span class="kw">let </span>encoding = <span class="self">self</span>.encoding();
<span class="kw">if </span>encoding == UTF_16LE || encoding == UTF_16BE {
<span class="comment">// No need to consider the internal state of the underlying decoder,
// because it is at start, because no data has reached it yet.
</span><span class="kw">return </span><span class="prelude-val">Some</span>(utf16_bom);
} <span class="kw">else if let </span><span class="prelude-val">Some</span>(non_bom) = <span class="self">self</span>.variant.max_utf16_buffer_length(sum) {
<span class="kw">return </span><span class="prelude-val">Some</span>(core::cmp::max(utf16_bom, non_bom));
}
}
}
}
DecoderLifeCycle::Finished =&gt; <span class="macro">panic!</span>(<span class="string">&quot;Must not use a decoder that has finished.&quot;</span>),
}
<span class="prelude-val">None
</span>}
<span class="doccomment">/// Incrementally decode a byte stream into UTF-16 with malformed sequences
/// replaced with the REPLACEMENT CHARACTER.
///
/// See the documentation of the struct for documentation for `decode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>decode_to_utf16(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u8],
dst: <span class="kw-2">&amp;mut </span>[u16],
last: bool,
) -&gt; (CoderResult, usize, usize, bool) {
<span class="kw">let </span><span class="kw-2">mut </span>had_errors = <span class="bool-val">false</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_read = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_written = <span class="number">0usize</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, written) = <span class="self">self</span>.decode_to_utf16_without_replacement(
<span class="kw-2">&amp;</span>src[total_read..],
<span class="kw-2">&amp;mut </span>dst[total_written..],
last,
);
total_read += read;
total_written += written;
<span class="kw">match </span>result {
DecoderResult::InputEmpty =&gt; {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_errors,
);
}
DecoderResult::OutputFull =&gt; {
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_errors,
);
}
DecoderResult::Malformed(<span class="kw">_</span>, <span class="kw">_</span>) =&gt; {
had_errors = <span class="bool-val">true</span>;
<span class="comment">// There should always be space for the U+FFFD, because
// otherwise we&#39;d have gotten OutputFull already.
</span>dst[total_written] = <span class="number">0xFFFD</span>;
total_written += <span class="number">1</span>;
}
}
}
}
<span class="macro">public_decode_function!</span>(<span class="doccomment">/// Incrementally decode a byte stream into UTF-16
/// _without replacement_.
///
/// See the documentation of the struct for
/// documentation for `decode_*` methods
/// collectively.
///
/// Available via the C wrapper.
</span>,
decode_to_utf16_without_replacement,
decode_to_utf16_raw,
decode_to_utf16_checking_end,
decode_to_utf16_after_one_potential_bom_byte,
decode_to_utf16_after_two_potential_bom_bytes,
decode_to_utf16_checking_end_with_offset,
u16);
<span class="doccomment">/// Checks for compatibility with storing Unicode scalar values as unsigned
/// bytes taking into account the state of the decoder.
///
/// Returns `None` if the decoder is not in a neutral state, including waiting
/// for the BOM, or if the encoding is never Latin1-byte-compatible.
///
/// Otherwise returns the index of the first byte whose unsigned value doesn&#39;t
/// directly correspond to the decoded Unicode scalar value, or the length
/// of the input if all bytes in the input decode directly to scalar values
/// corresponding to the unsigned byte values.
///
/// Does not change the state of the decoder.
///
/// Do not use this unless you are supporting SpiderMonkey/V8-style string
/// storage optimizations.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>latin1_byte_compatible_up_to(<span class="kw-2">&amp;</span><span class="self">self</span>, bytes: <span class="kw-2">&amp;</span>[u8]) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">match </span><span class="self">self</span>.life_cycle {
DecoderLifeCycle::Converting =&gt; {
<span class="kw">return </span><span class="self">self</span>.variant.latin1_byte_compatible_up_to(bytes);
}
DecoderLifeCycle::Finished =&gt; <span class="macro">panic!</span>(<span class="string">&quot;Must not use a decoder that has finished.&quot;</span>),
<span class="kw">_ </span>=&gt; <span class="prelude-val">None</span>,
}
}
}
<span class="doccomment">/// Result of a (potentially partial) encode operation without replacement.
</span><span class="attribute">#[must_use]
#[derive(Debug, PartialEq, Eq)]
</span><span class="kw">pub enum </span>EncoderResult {
<span class="doccomment">/// The input was exhausted.
///
/// If this result was returned from a call where `last` was `true`, the
/// decoding process has completed. Otherwise, the caller should call a
/// decode method again with more input.
</span>InputEmpty,
<span class="doccomment">/// The encoder cannot produce another unit of output, because the output
/// buffer does not have enough space left.
///
/// The caller must provide more output space upon the next call and re-push
/// the remaining input to the decoder.
</span>OutputFull,
<span class="doccomment">/// The encoder encountered an unmappable character.
///
/// The caller must either treat this as a fatal error or must append
/// a placeholder to the output and then re-push the remaining input to the
/// encoder.
</span>Unmappable(char),
}
<span class="kw">impl </span>EncoderResult {
<span class="kw">fn </span>unmappable_from_bmp(bmp: u16) -&gt; EncoderResult {
EncoderResult::Unmappable(::core::char::from_u32(u32::from(bmp)).unwrap())
}
}
<span class="doccomment">/// A converter that encodes a Unicode stream into bytes according to a
/// character encoding in a streaming (incremental) manner.
///
/// The various `encode_*` methods take an input buffer (`src`) and an output
/// buffer `dst` both of which are caller-allocated. There are variants for
/// both UTF-8 and UTF-16 input buffers.
///
/// An `encode_*` method encode characters from `src` into bytes characters
/// stored into `dst` until one of the following three things happens:
///
/// 1. An unmappable character is encountered (`*_without_replacement` variants
/// only).
///
/// 2. The output buffer has been filled so near capacity that the decoder
/// cannot be sure that processing an additional character of input wouldn&#39;t
/// cause so much output that the output buffer would overflow.
///
/// 3. All the input characters have been processed.
///
/// The `encode_*` method then returns tuple of a status indicating which one
/// of the three reasons to return happened, how many input code units (`u8`
/// when encoding from UTF-8 and `u16` when encoding from UTF-16) were read,
/// how many output bytes were written (except when encoding into `Vec&lt;u8&gt;`,
/// whose length change indicates this), and in the case of the variants that
/// perform replacement, a boolean indicating whether an unmappable
/// character was replaced with a numeric character reference during the call.
///
/// The number of bytes &quot;written&quot; is what&#39;s logically written. Garbage may be
/// written in the output buffer beyond the point logically written to.
///
/// In the case of the methods whose name ends with
/// `*_without_replacement`, the status is an [`EncoderResult`][1] enumeration
/// (possibilities `Unmappable`, `OutputFull` and `InputEmpty` corresponding to
/// the three cases listed above).
///
/// In the case of methods whose name does not end with
/// `*_without_replacement`, unmappable characters are automatically replaced
/// with the corresponding numeric character references and unmappable
/// characters do not cause the methods to return early.
///
/// When encoding from UTF-8 without replacement, the methods are guaranteed
/// not to return indicating that more output space is needed if the length
/// of the output buffer is at least the length returned by
/// [`max_buffer_length_from_utf8_without_replacement()`][2]. When encoding from
/// UTF-8 with replacement, the length of the output buffer that guarantees the
/// methods not to return indicating that more output space is needed in the
/// absence of unmappable characters is given by
/// [`max_buffer_length_from_utf8_if_no_unmappables()`][3]. When encoding from
/// UTF-16 without replacement, the methods are guaranteed not to return
/// indicating that more output space is needed if the length of the output
/// buffer is at least the length returned by
/// [`max_buffer_length_from_utf16_without_replacement()`][4]. When encoding
/// from UTF-16 with replacement, the the length of the output buffer that
/// guarantees the methods not to return indicating that more output space is
/// needed in the absence of unmappable characters is given by
/// [`max_buffer_length_from_utf16_if_no_unmappables()`][5].
/// When encoding with replacement, applications are not expected to size the
/// buffer for the worst case ahead of time but to resize the buffer if there
/// are unmappable characters. This is why max length queries are only available
/// for the case where there are no unmappable characters.
///
/// When encoding from UTF-8, each `src` buffer _must_ be valid UTF-8. (When
/// calling from Rust, the type system takes care of this.) When encoding from
/// UTF-16, unpaired surrogates in the input are treated as U+FFFD REPLACEMENT
/// CHARACTERS. Therefore, in order for astral characters not to turn into a
/// pair of REPLACEMENT CHARACTERS, the caller must ensure that surrogate pairs
/// are not split across input buffer boundaries.
///
/// After an `encode_*` call returns, the output produced so far, taken as a
/// whole from the start of the stream, is guaranteed to consist of a valid
/// byte sequence in the target encoding. (I.e. the code unit sequence for a
/// character is guaranteed not to be split across output buffers. However, due
/// to the stateful nature of ISO-2022-JP, the stream needs to be considered
/// from the start for it to be valid. For other encodings, the validity holds
/// on a per-output buffer basis.)
///
/// The boolean argument `last` indicates that the end of the stream is reached
/// when all the characters in `src` have been consumed. This argument is needed
/// for ISO-2022-JP and is ignored for other encodings.
///
/// An `Encoder` object can be used to incrementally encode a byte stream.
///
/// During the processing of a single stream, the caller must call `encode_*`
/// zero or more times with `last` set to `false` and then call `encode_*` at
/// least once with `last` set to `true`. If `encode_*` returns `InputEmpty`,
/// the processing of the stream has ended. Otherwise, the caller must call
/// `encode_*` again with `last` set to `true` (or treat an `Unmappable` result
/// as a fatal error).
///
/// Once the stream has ended, the `Encoder` object must not be used anymore.
/// That is, you need to create another one to process another stream.
///
/// When the encoder returns `OutputFull` or the encoder returns `Unmappable`
/// and the caller does not wish to treat it as a fatal error, the input buffer
/// `src` may not have been completely consumed. In that case, the caller must
/// pass the unconsumed contents of `src` to `encode_*` again upon the next
/// call.
///
/// [1]: enum.EncoderResult.html
/// [2]: #method.max_buffer_length_from_utf8_without_replacement
/// [3]: #method.max_buffer_length_from_utf8_if_no_unmappables
/// [4]: #method.max_buffer_length_from_utf16_without_replacement
/// [5]: #method.max_buffer_length_from_utf16_if_no_unmappables
///
/// # Infinite loops
///
/// When converting with a fixed-size output buffer whose size is too small to
/// accommodate one character of output, an infinite loop ensues. When
/// converting with a fixed-size output buffer, it generally makes sense to
/// make the buffer fairly large (e.g. couple of kilobytes).
</span><span class="kw">pub struct </span>Encoder {
encoding: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding,
variant: VariantEncoder,
}
<span class="kw">impl </span>Encoder {
<span class="kw">fn </span>new(enc: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding, encoder: VariantEncoder) -&gt; Encoder {
Encoder {
encoding: enc,
variant: encoder,
}
}
<span class="doccomment">/// The `Encoding` this `Encoder` is for.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>encoding(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding {
<span class="self">self</span>.encoding
}
<span class="doccomment">/// Returns `true` if this is an ISO-2022-JP encoder that&#39;s not in the
/// ASCII state and `false` otherwise.
</span><span class="attribute">#[inline]
</span><span class="kw">pub fn </span>has_pending_state(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
<span class="self">self</span>.variant.has_pending_state()
}
<span class="doccomment">/// Query the worst-case output size when encoding from UTF-8 with
/// replacement.
///
/// Returns the size of the output buffer in bytes that will not overflow
/// given the current state of the encoder and `byte_length` number of
/// additional input code units if there are no unmappable characters in
/// the input or `None` if `usize` would overflow.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_buffer_length_from_utf8_if_no_unmappables(
<span class="kw-2">&amp;</span><span class="self">self</span>,
byte_length: usize,
) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
checked_add(
<span class="kw">if </span><span class="self">self</span>.encoding().can_encode_everything() {
<span class="number">0
</span>} <span class="kw">else </span>{
NCR_EXTRA
},
<span class="self">self</span>.max_buffer_length_from_utf8_without_replacement(byte_length),
)
}
<span class="doccomment">/// Query the worst-case output size when encoding from UTF-8 without
/// replacement.
///
/// Returns the size of the output buffer in bytes that will not overflow
/// given the current state of the encoder and `byte_length` number of
/// additional input code units or `None` if `usize` would overflow.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_buffer_length_from_utf8_without_replacement(
<span class="kw-2">&amp;</span><span class="self">self</span>,
byte_length: usize,
) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="self">self</span>.variant
.max_buffer_length_from_utf8_without_replacement(byte_length)
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-8 with unmappable
/// characters replaced with HTML (decimal) numeric character references.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>encode_from_utf8(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>str,
dst: <span class="kw-2">&amp;mut </span>[u8],
last: bool,
) -&gt; (CoderResult, usize, usize, bool) {
<span class="kw">let </span>dst_len = dst.len();
<span class="kw">let </span>effective_dst_len = <span class="kw">if </span><span class="self">self</span>.encoding().can_encode_everything() {
dst_len
} <span class="kw">else </span>{
<span class="kw">if </span>dst_len &lt; NCR_EXTRA {
<span class="kw">if </span>src.is_empty() &amp;&amp; !(last &amp;&amp; <span class="self">self</span>.has_pending_state()) {
<span class="kw">return </span>(CoderResult::InputEmpty, <span class="number">0</span>, <span class="number">0</span>, <span class="bool-val">false</span>);
}
<span class="kw">return </span>(CoderResult::OutputFull, <span class="number">0</span>, <span class="number">0</span>, <span class="bool-val">false</span>);
}
dst_len - NCR_EXTRA
};
<span class="kw">let </span><span class="kw-2">mut </span>had_unmappables = <span class="bool-val">false</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_read = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_written = <span class="number">0usize</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, written) = <span class="self">self</span>.encode_from_utf8_without_replacement(
<span class="kw-2">&amp;</span>src[total_read..],
<span class="kw-2">&amp;mut </span>dst[total_written..effective_dst_len],
last,
);
total_read += read;
total_written += written;
<span class="kw">match </span>result {
EncoderResult::InputEmpty =&gt; {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_unmappables,
);
}
EncoderResult::OutputFull =&gt; {
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_unmappables,
);
}
EncoderResult::Unmappable(unmappable) =&gt; {
had_unmappables = <span class="bool-val">true</span>;
<span class="macro">debug_assert!</span>(dst.len() - total_written &gt;= NCR_EXTRA);
<span class="macro">debug_assert_ne!</span>(<span class="self">self</span>.encoding(), UTF_16BE);
<span class="macro">debug_assert_ne!</span>(<span class="self">self</span>.encoding(), UTF_16LE);
<span class="comment">// Additionally, Iso2022JpEncoder is responsible for
// transitioning to ASCII when returning with Unmappable.
</span>total_written += write_ncr(unmappable, <span class="kw-2">&amp;mut </span>dst[total_written..]);
<span class="kw">if </span>total_written &gt;= effective_dst_len {
<span class="kw">if </span>total_read == src.len() &amp;&amp; !(last &amp;&amp; <span class="self">self</span>.has_pending_state()) {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_unmappables,
);
}
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_unmappables,
);
}
}
}
}
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-8 with unmappable
/// characters replaced with HTML (decimal) numeric character references.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>encode_from_utf8_to_vec(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>str,
dst: <span class="kw-2">&amp;mut </span>Vec&lt;u8&gt;,
last: bool,
) -&gt; (CoderResult, usize, bool) {
<span class="kw">unsafe </span>{
<span class="kw">let </span>old_len = dst.len();
<span class="kw">let </span>capacity = dst.capacity();
dst.set_len(capacity);
<span class="kw">let </span>(result, read, written, replaced) =
<span class="self">self</span>.encode_from_utf8(src, <span class="kw-2">&amp;mut </span>dst[old_len..], last);
dst.set_len(old_len + written);
(result, read, replaced)
}
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-8 _without replacement_.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>encode_from_utf8_without_replacement(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>str,
dst: <span class="kw-2">&amp;mut </span>[u8],
last: bool,
) -&gt; (EncoderResult, usize, usize) {
<span class="self">self</span>.variant.encode_from_utf8_raw(src, dst, last)
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-8 _without replacement_.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available to Rust only and only with the `alloc` feature enabled (enabled
/// by default).
</span><span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
</span><span class="kw">pub fn </span>encode_from_utf8_to_vec_without_replacement(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>str,
dst: <span class="kw-2">&amp;mut </span>Vec&lt;u8&gt;,
last: bool,
) -&gt; (EncoderResult, usize) {
<span class="kw">unsafe </span>{
<span class="kw">let </span>old_len = dst.len();
<span class="kw">let </span>capacity = dst.capacity();
dst.set_len(capacity);
<span class="kw">let </span>(result, read, written) =
<span class="self">self</span>.encode_from_utf8_without_replacement(src, <span class="kw-2">&amp;mut </span>dst[old_len..], last);
dst.set_len(old_len + written);
(result, read)
}
}
<span class="doccomment">/// Query the worst-case output size when encoding from UTF-16 with
/// replacement.
///
/// Returns the size of the output buffer in bytes that will not overflow
/// given the current state of the encoder and `u16_length` number of
/// additional input code units if there are no unmappable characters in
/// the input or `None` if `usize` would overflow.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_buffer_length_from_utf16_if_no_unmappables(
<span class="kw-2">&amp;</span><span class="self">self</span>,
u16_length: usize,
) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
checked_add(
<span class="kw">if </span><span class="self">self</span>.encoding().can_encode_everything() {
<span class="number">0
</span>} <span class="kw">else </span>{
NCR_EXTRA
},
<span class="self">self</span>.max_buffer_length_from_utf16_without_replacement(u16_length),
)
}
<span class="doccomment">/// Query the worst-case output size when encoding from UTF-16 without
/// replacement.
///
/// Returns the size of the output buffer in bytes that will not overflow
/// given the current state of the encoder and `u16_length` number of
/// additional input code units or `None` if `usize` would overflow.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>max_buffer_length_from_utf16_without_replacement(
<span class="kw-2">&amp;</span><span class="self">self</span>,
u16_length: usize,
) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="self">self</span>.variant
.max_buffer_length_from_utf16_without_replacement(u16_length)
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-16 with unmappable
/// characters replaced with HTML (decimal) numeric character references.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>encode_from_utf16(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u16],
dst: <span class="kw-2">&amp;mut </span>[u8],
last: bool,
) -&gt; (CoderResult, usize, usize, bool) {
<span class="kw">let </span>dst_len = dst.len();
<span class="kw">let </span>effective_dst_len = <span class="kw">if </span><span class="self">self</span>.encoding().can_encode_everything() {
dst_len
} <span class="kw">else </span>{
<span class="kw">if </span>dst_len &lt; NCR_EXTRA {
<span class="kw">if </span>src.is_empty() &amp;&amp; !(last &amp;&amp; <span class="self">self</span>.has_pending_state()) {
<span class="kw">return </span>(CoderResult::InputEmpty, <span class="number">0</span>, <span class="number">0</span>, <span class="bool-val">false</span>);
}
<span class="kw">return </span>(CoderResult::OutputFull, <span class="number">0</span>, <span class="number">0</span>, <span class="bool-val">false</span>);
}
dst_len - NCR_EXTRA
};
<span class="kw">let </span><span class="kw-2">mut </span>had_unmappables = <span class="bool-val">false</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_read = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>total_written = <span class="number">0usize</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>(result, read, written) = <span class="self">self</span>.encode_from_utf16_without_replacement(
<span class="kw-2">&amp;</span>src[total_read..],
<span class="kw-2">&amp;mut </span>dst[total_written..effective_dst_len],
last,
);
total_read += read;
total_written += written;
<span class="kw">match </span>result {
EncoderResult::InputEmpty =&gt; {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_unmappables,
);
}
EncoderResult::OutputFull =&gt; {
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_unmappables,
);
}
EncoderResult::Unmappable(unmappable) =&gt; {
had_unmappables = <span class="bool-val">true</span>;
<span class="macro">debug_assert!</span>(dst.len() - total_written &gt;= NCR_EXTRA);
<span class="comment">// There are no UTF-16 encoders and even if there were,
// they&#39;d never have unmappables.
</span><span class="macro">debug_assert_ne!</span>(<span class="self">self</span>.encoding(), UTF_16BE);
<span class="macro">debug_assert_ne!</span>(<span class="self">self</span>.encoding(), UTF_16LE);
<span class="comment">// Additionally, Iso2022JpEncoder is responsible for
// transitioning to ASCII when returning with Unmappable
// from the jis0208 state. That is, when we encode
// ISO-2022-JP and come here, the encoder is in either the
// ASCII or the Roman state. We are allowed to generate any
// printable ASCII excluding \ and ~.
</span>total_written += write_ncr(unmappable, <span class="kw-2">&amp;mut </span>dst[total_written..]);
<span class="kw">if </span>total_written &gt;= effective_dst_len {
<span class="kw">if </span>total_read == src.len() &amp;&amp; !(last &amp;&amp; <span class="self">self</span>.has_pending_state()) {
<span class="kw">return </span>(
CoderResult::InputEmpty,
total_read,
total_written,
had_unmappables,
);
}
<span class="kw">return </span>(
CoderResult::OutputFull,
total_read,
total_written,
had_unmappables,
);
}
}
}
}
}
<span class="doccomment">/// Incrementally encode into byte stream from UTF-16 _without replacement_.
///
/// See the documentation of the struct for documentation for `encode_*`
/// methods collectively.
///
/// Available via the C wrapper.
</span><span class="kw">pub fn </span>encode_from_utf16_without_replacement(
<span class="kw-2">&amp;mut </span><span class="self">self</span>,
src: <span class="kw-2">&amp;</span>[u16],
dst: <span class="kw-2">&amp;mut </span>[u8],
last: bool,
) -&gt; (EncoderResult, usize, usize) {
<span class="self">self</span>.variant.encode_from_utf16_raw(src, dst, last)
}
}
<span class="doccomment">/// Format an unmappable as NCR without heap allocation.
</span><span class="kw">fn </span>write_ncr(unmappable: char, dst: <span class="kw-2">&amp;mut </span>[u8]) -&gt; usize {
<span class="comment">// len is the number of decimal digits needed to represent unmappable plus
// 3 (the length of &quot;&amp;#&quot; and &quot;;&quot;).
</span><span class="kw">let </span><span class="kw-2">mut </span>number = unmappable <span class="kw">as </span>u32;
<span class="kw">let </span>len = <span class="kw">if </span>number &gt;= <span class="number">1_000_000u32 </span>{
<span class="number">10usize
</span>} <span class="kw">else if </span>number &gt;= <span class="number">100_000u32 </span>{
<span class="number">9usize
</span>} <span class="kw">else if </span>number &gt;= <span class="number">10_000u32 </span>{
<span class="number">8usize
</span>} <span class="kw">else if </span>number &gt;= <span class="number">1_000u32 </span>{
<span class="number">7usize
</span>} <span class="kw">else if </span>number &gt;= <span class="number">100u32 </span>{
<span class="number">6usize
</span>} <span class="kw">else </span>{
<span class="comment">// Review the outcome of https://github.com/whatwg/encoding/issues/15
// to see if this case is possible
</span><span class="number">5usize
</span>};
<span class="macro">debug_assert!</span>(number &gt;= <span class="number">10u32</span>);
<span class="macro">debug_assert!</span>(len &lt;= dst.len());
<span class="kw">let </span><span class="kw-2">mut </span>pos = len - <span class="number">1</span>;
dst[pos] = <span class="string">b&#39;;&#39;</span>;
pos -= <span class="number">1</span>;
<span class="kw">loop </span>{
<span class="kw">let </span>rightmost = number % <span class="number">10</span>;
dst[pos] = rightmost <span class="kw">as </span>u8 + <span class="string">b&#39;0&#39;</span>;
pos -= <span class="number">1</span>;
<span class="kw">if </span>number &lt; <span class="number">10 </span>{
<span class="kw">break</span>;
}
number /= <span class="number">10</span>;
}
dst[<span class="number">1</span>] = <span class="string">b&#39;#&#39;</span>;
dst[<span class="number">0</span>] = <span class="string">b&#39;&amp;&#39;</span>;
len
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_range16(i: u16, start: u16, end: u16) -&gt; bool {
i.wrapping_sub(start) &lt; (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_range32(i: u32, start: u32, end: u32) -&gt; bool {
i.wrapping_sub(start) &lt; (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_inclusive_range8(i: u8, start: u8, end: u8) -&gt; bool {
i.wrapping_sub(start) &lt;= (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_inclusive_range16(i: u16, start: u16, end: u16) -&gt; bool {
i.wrapping_sub(start) &lt;= (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_inclusive_range32(i: u32, start: u32, end: u32) -&gt; bool {
i.wrapping_sub(start) &lt;= (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>in_inclusive_range(i: usize, start: usize, end: usize) -&gt; bool {
i.wrapping_sub(start) &lt;= (end - start)
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>checked_add(num: usize, opt: <span class="prelude-ty">Option</span>&lt;usize&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(n) = opt {
n.checked_add(num)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>checked_add_opt(one: <span class="prelude-ty">Option</span>&lt;usize&gt;, other: <span class="prelude-ty">Option</span>&lt;usize&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(n) = one {
checked_add(n, other)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>checked_mul(num: usize, opt: <span class="prelude-ty">Option</span>&lt;usize&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(n) = opt {
n.checked_mul(num)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
}
<span class="attribute">#[inline(always)]
</span><span class="kw">fn </span>checked_div(opt: <span class="prelude-ty">Option</span>&lt;usize&gt;, num: usize) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(n) = opt {
n.checked_div(num)
} <span class="kw">else </span>{
<span class="prelude-val">None
</span>}
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[inline(always)]
</span><span class="kw">fn </span>checked_next_power_of_two(opt: <span class="prelude-ty">Option</span>&lt;usize&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
opt.map(|n| n.next_power_of_two())
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;alloc&quot;</span>)]
#[inline(always)]
</span><span class="kw">fn </span>checked_min(one: <span class="prelude-ty">Option</span>&lt;usize&gt;, other: <span class="prelude-ty">Option</span>&lt;usize&gt;) -&gt; <span class="prelude-ty">Option</span>&lt;usize&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(a) = one {
<span class="kw">if let </span><span class="prelude-val">Some</span>(b) = other {
<span class="prelude-val">Some</span>(::core::cmp::min(a, b))
} <span class="kw">else </span>{
<span class="prelude-val">Some</span>(a)
}
} <span class="kw">else </span>{
other
}
}
<span class="comment">// ############## TESTS ###############
</span><span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;serde&quot;</span>))]
#[derive(Serialize, Deserialize, Debug, PartialEq)]
</span><span class="kw">struct </span>Demo {
num: u32,
name: String,
enc: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding,
}
<span class="attribute">#[cfg(test)]
</span><span class="kw">mod </span>test_labels_names;
<span class="attribute">#[cfg(all(test, feature = <span class="string">&quot;alloc&quot;</span>))]
</span><span class="kw">mod </span>tests {
<span class="kw">use super</span>::<span class="kw-2">*</span>;
<span class="kw">use </span>alloc::borrow::Cow;
<span class="kw">fn </span>sniff_to_utf16(
initial_encoding: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding,
expected_encoding: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static </span>Encoding,
bytes: <span class="kw-2">&amp;</span>[u8],
expect: <span class="kw-2">&amp;</span>[u16],
breaks: <span class="kw-2">&amp;</span>[usize],
) {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = initial_encoding.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dest: Vec&lt;u16&gt; =
Vec::with_capacity(decoder.max_utf16_buffer_length(bytes.len()).unwrap());
<span class="kw">let </span>capacity = dest.capacity();
dest.resize(capacity, <span class="number">0u16</span>);
<span class="kw">let </span><span class="kw-2">mut </span>total_written = <span class="number">0usize</span>;
<span class="kw">let </span><span class="kw-2">mut </span>start = <span class="number">0usize</span>;
<span class="kw">for </span>br <span class="kw">in </span>breaks {
<span class="kw">let </span>(result, read, written, <span class="kw">_</span>) =
decoder.decode_to_utf16(<span class="kw-2">&amp;</span>bytes[start..<span class="kw-2">*</span>br], <span class="kw-2">&amp;mut </span>dest[total_written..], <span class="bool-val">false</span>);
total_written += written;
<span class="macro">assert_eq!</span>(read, <span class="kw-2">*</span>br - start);
<span class="kw">match </span>result {
CoderResult::InputEmpty =&gt; {}
CoderResult::OutputFull =&gt; {
<span class="macro">unreachable!</span>();
}
}
start = <span class="kw-2">*</span>br;
}
<span class="kw">let </span>(result, read, written, <span class="kw">_</span>) =
decoder.decode_to_utf16(<span class="kw-2">&amp;</span>bytes[start..], <span class="kw-2">&amp;mut </span>dest[total_written..], <span class="bool-val">true</span>);
total_written += written;
<span class="kw">match </span>result {
CoderResult::InputEmpty =&gt; {}
CoderResult::OutputFull =&gt; {
<span class="macro">unreachable!</span>();
}
}
<span class="macro">assert_eq!</span>(read, bytes.len() - start);
<span class="macro">assert_eq!</span>(total_written, expect.len());
<span class="macro">assert_eq!</span>(<span class="kw-2">&amp;</span>dest[..total_written], expect);
<span class="macro">assert_eq!</span>(decoder.encoding(), expected_encoding);
}
<span class="comment">// Any copyright to the test code below this comment is dedicated to the
// Public Domain. http://creativecommons.org/publicdomain/zero/1.0/
</span><span class="attribute">#[test]
</span><span class="kw">fn </span>test_bom_sniffing() {
<span class="comment">// ASCII
</span>sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
<span class="comment">// UTF-8
</span>sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">2</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">3</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">4</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">2</span>, <span class="number">3</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">3</span>],
);
sniff_to_utf16(
WINDOWS_1252,
UTF_8,
<span class="string">b&quot;\xEF\xBB\xBF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>],
);
sniff_to_utf16(WINDOWS_1252, UTF_8, <span class="string">b&quot;\xEF\xBB\xBF&quot;</span>, <span class="kw-2">&amp;</span>[], <span class="kw-2">&amp;</span>[]);
<span class="comment">// Not UTF-8
</span>sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\xBB\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x00BBu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\xBB\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x00BBu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\xBB&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x00BBu16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xEF\xBB&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>, <span class="number">0x00BBu16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(WINDOWS_1252, WINDOWS_1252, <span class="string">b&quot;\xEF&quot;</span>, <span class="kw-2">&amp;</span>[<span class="number">0x00EFu16</span>], <span class="kw-2">&amp;</span>[]);
<span class="comment">// Not UTF-16
</span>sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xFE\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00FEu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xFE\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00FEu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(WINDOWS_1252, WINDOWS_1252, <span class="string">b&quot;\xFE&quot;</span>, <span class="kw-2">&amp;</span>[<span class="number">0x00FEu16</span>], <span class="kw-2">&amp;</span>[]);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xFF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00FFu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[],
);
sniff_to_utf16(
WINDOWS_1252,
WINDOWS_1252,
<span class="string">b&quot;\xFF\x61\x62&quot;</span>,
<span class="kw-2">&amp;</span>[<span class="number">0x00FFu16</span>, <span class="number">0x0061u16</span>, <span class="number">0x0062u16</span>],
<span class="kw-2">&amp;</span>[<span class="number">1</span>],
);
sniff_to_utf16(WINDOWS_1252, WINDOWS_1252, <span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;</span>[<span class="number">0x00FFu16</span>], <span class="kw-2">&amp;</span>[]);
<span class="comment">// UTF-16
</span>sniff_to_utf16(WINDOWS_1252, UTF_16BE, <span class="string">b&quot;\xFE\xFF&quot;</span>, <span class="kw-2">&amp;</span>[], <span class="kw-2">&amp;</span>[]);
sniff_to_utf16(WINDOWS_1252, UTF_16BE, <span class="string">b&quot;\xFE\xFF&quot;</span>, <span class="kw-2">&amp;</span>[], <span class="kw-2">&amp;</span>[<span class="number">1</span>]);
sniff_to_utf16(WINDOWS_1252, UTF_16LE, <span class="string">b&quot;\xFF\xFE&quot;</span>, <span class="kw-2">&amp;</span>[], <span class="kw-2">&amp;</span>[]);
sniff_to_utf16(WINDOWS_1252, UTF_16LE, <span class="string">b&quot;\xFF\xFE&quot;</span>, <span class="kw-2">&amp;</span>[], <span class="kw-2">&amp;</span>[<span class="number">1</span>]);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_output_encoding() {
<span class="macro">assert_eq!</span>(REPLACEMENT.output_encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_16BE.output_encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_16LE.output_encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_8.output_encoding(), UTF_8);
<span class="macro">assert_eq!</span>(WINDOWS_1252.output_encoding(), WINDOWS_1252);
<span class="macro">assert_eq!</span>(REPLACEMENT.new_encoder().encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_16BE.new_encoder().encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_16LE.new_encoder().encoding(), UTF_8);
<span class="macro">assert_eq!</span>(UTF_8.new_encoder().encoding(), UTF_8);
<span class="macro">assert_eq!</span>(WINDOWS_1252.new_encoder().encoding(), WINDOWS_1252);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_label_resolution() {
<span class="macro">assert_eq!</span>(Encoding::for_label(<span class="string">b&quot;utf-8&quot;</span>), <span class="prelude-val">Some</span>(UTF_8));
<span class="macro">assert_eq!</span>(Encoding::for_label(<span class="string">b&quot;UTF-8&quot;</span>), <span class="prelude-val">Some</span>(UTF_8));
<span class="macro">assert_eq!</span>(
Encoding::for_label(<span class="string">b&quot; \t \n \x0C \n utf-8 \r \n \t \x0C &quot;</span>),
<span class="prelude-val">Some</span>(UTF_8)
);
<span class="macro">assert_eq!</span>(Encoding::for_label(<span class="string">b&quot;utf-8 _&quot;</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(Encoding::for_label(<span class="string">b&quot;bogus&quot;</span>), <span class="prelude-val">None</span>);
<span class="macro">assert_eq!</span>(Encoding::for_label(<span class="string">b&quot;bogusbogusbogusbogus&quot;</span>), <span class="prelude-val">None</span>);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_valid_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.decode(<span class="string">b&quot;abc\x80\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert_eq!</span>(encoding, WINDOWS_1257);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_invalid_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.decode(<span class="string">b&quot;abc\x80\xA1\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert_eq!</span>(encoding, WINDOWS_1257);
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_ascii_only_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.decode(<span class="string">b&quot;abc&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert_eq!</span>(encoding, WINDOWS_1257);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_as_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.decode(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{20AC}\u{00E4}&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert_eq!</span>(encoding, UTF_8);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_invalid_utf8_as_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) =
WINDOWS_1257.decode(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert_eq!</span>(encoding, UTF_8);
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_as_utf_8_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = UTF_8.decode(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{20AC}\u{00E4}&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert_eq!</span>(encoding, UTF_8);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_invalid_utf8_as_utf_8_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = UTF_8.decode(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert_eq!</span>(encoding, UTF_8);
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_as_utf_8_to_cow_with_bom_removal() {
<span class="kw">let </span>(cow, had_errors) = UTF_8.decode_with_bom_removal(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{20AC}\u{00E4}&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_as_windows_1257_to_cow_with_bom_removal() {
<span class="kw">let </span>(cow, had_errors) =
WINDOWS_1257.decode_with_bom_removal(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(
s,
<span class="string">&quot;\u{013C}\u{00BB}\u{00E6}\u{0101}\u{201A}\u{00AC}\u{0106}\u{00A4}&quot;
</span>);
}
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_valid_windows_1257_to_cow_with_bom_removal() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_with_bom_removal(<span class="string">b&quot;abc\x80\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_invalid_windows_1257_to_cow_with_bom_removal() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_with_bom_removal(<span class="string">b&quot;abc\x80\xA1\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_ascii_only_windows_1257_to_cow_with_bom_removal() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_with_bom_removal(<span class="string">b&quot;abc&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_to_cow_without_bom_handling() {
<span class="kw">let </span>(cow, had_errors) =
UTF_8.decode_without_bom_handling(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{FEFF}\u{20AC}\u{00E4}&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_invalid_utf8_to_cow_without_bom_handling() {
<span class="kw">let </span>(cow, had_errors) =
UTF_8.decode_without_bom_handling(<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{FEFF}\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_valid_windows_1257_to_cow_without_bom_handling() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_without_bom_handling(<span class="string">b&quot;abc\x80\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_invalid_windows_1257_to_cow_without_bom_handling() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_without_bom_handling(<span class="string">b&quot;abc\x80\xA1\xE4&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{FFFD}\u{00E4}&quot;</span>);
}
}
<span class="macro">assert!</span>(had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_ascii_only_windows_1257_to_cow_without_bom_handling() {
<span class="kw">let </span>(cow, had_errors) = WINDOWS_1257.decode_without_bom_handling(<span class="string">b&quot;abc&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_valid_utf8_to_cow_without_bom_handling_and_without_replacement() {
<span class="kw">match </span>UTF_8.decode_without_bom_handling_and_without_replacement(
<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\xC3\xA4&quot;</span>,
) {
<span class="prelude-val">Some</span>(cow) =&gt; <span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;\u{FEFF}\u{20AC}\u{00E4}&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
},
<span class="prelude-val">None </span>=&gt; <span class="macro">unreachable!</span>(),
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_bomful_invalid_utf8_to_cow_without_bom_handling_and_without_replacement() {
<span class="macro">assert!</span>(UTF_8
.decode_without_bom_handling_and_without_replacement(
<span class="string">b&quot;\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4&quot;
</span>)
.is_none());
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_valid_windows_1257_to_cow_without_bom_handling_and_without_replacement() {
<span class="kw">match </span>WINDOWS_1257.decode_without_bom_handling_and_without_replacement(<span class="string">b&quot;abc\x80\xE4&quot;</span>) {
<span class="prelude-val">Some</span>(cow) =&gt; <span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc\u{20AC}\u{00E4}&quot;</span>);
}
},
<span class="prelude-val">None </span>=&gt; <span class="macro">unreachable!</span>(),
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_invalid_windows_1257_to_cow_without_bom_handling_and_without_replacement() {
<span class="macro">assert!</span>(WINDOWS_1257
.decode_without_bom_handling_and_without_replacement(<span class="string">b&quot;abc\x80\xA1\xE4&quot;</span>)
.is_none());
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_decode_ascii_only_windows_1257_to_cow_without_bom_handling_and_without_replacement() {
<span class="kw">match </span>WINDOWS_1257.decode_without_bom_handling_and_without_replacement(<span class="string">b&quot;abc&quot;</span>) {
<span class="prelude-val">Some</span>(cow) =&gt; <span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">&quot;abc&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
},
<span class="prelude-val">None </span>=&gt; <span class="macro">unreachable!</span>(),
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_encode_ascii_only_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.encode(<span class="string">&quot;abc&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">b&quot;abc&quot;</span>);
}
Cow::Owned(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
}
<span class="macro">assert_eq!</span>(encoding, WINDOWS_1257);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_encode_valid_windows_1257_to_cow() {
<span class="kw">let </span>(cow, encoding, had_errors) = WINDOWS_1257.encode(<span class="string">&quot;abc\u{20AC}\u{00E4}&quot;</span>);
<span class="kw">match </span>cow {
Cow::Borrowed(<span class="kw">_</span>) =&gt; <span class="macro">unreachable!</span>(),
Cow::Owned(s) =&gt; {
<span class="macro">assert_eq!</span>(s, <span class="string">b&quot;abc\x80\xE4&quot;</span>);
}
}
<span class="macro">assert_eq!</span>(encoding, WINDOWS_1257);
<span class="macro">assert!</span>(!had_errors);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_utf16_space_with_one_bom_byte() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_16LE.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u16</span>; <span class="number">12</span>];
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_utf8_space_with_one_bom_byte() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_8.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u16</span>; <span class="number">12</span>];
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_utf16_space_with_two_bom_bytes() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_16LE.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u16</span>; <span class="number">12</span>];
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xEF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xBB&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_utf8_space_with_two_bom_bytes() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_8.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u16</span>; <span class="number">12</span>];
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xEF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xBB&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">1</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_utf16_space_with_one_bom_byte_and_a_second_byte_in_same_call() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_16LE.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u16</span>; <span class="number">12</span>];
{
<span class="kw">let </span>needed = decoder.max_utf16_buffer_length(<span class="number">2</span>).unwrap();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = decoder.decode_to_utf16(<span class="string">b&quot;\xFF\xFF&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_too_short_buffer_with_iso_2022_jp_ascii_from_utf8() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">8</span>];
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_too_short_buffer_with_iso_2022_jp_roman_from_utf8() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">16</span>];
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;\u{A5}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..<span class="number">8</span>], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..<span class="number">8</span>], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_buffer_end_iso_2022_jp_from_utf8() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">18</span>];
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf8(<span class="string">&quot;\u{A5}\u{1F4A9}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;\u{A5}\u{1F4A9}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;\u{1F4A9}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..<span class="number">13</span>], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf8(<span class="string">&quot;\u{1F4A9}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..<span class="number">13</span>], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_too_short_buffer_with_iso_2022_jp_ascii_from_utf16() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">8</span>];
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0u16</span>; <span class="number">0</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0u16</span>; <span class="number">0</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_too_short_buffer_with_iso_2022_jp_roman_from_utf16() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">16</span>];
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0xA5u16</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0u16</span>; <span class="number">0</span>], <span class="kw-2">&amp;mut </span>dst[..<span class="number">8</span>], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) = encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0u16</span>; <span class="number">0</span>], <span class="kw-2">&amp;mut </span>dst[..<span class="number">8</span>], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_buffer_end_iso_2022_jp_from_utf16() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">18</span>];
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0xA5u16</span>, <span class="number">0xD83Du16</span>, <span class="number">0xDCA9u16</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0xA5u16</span>, <span class="number">0xD83Du16</span>, <span class="number">0xDCA9u16</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0xD83Du16</span>, <span class="number">0xDCA9u16</span>], <span class="kw-2">&amp;mut </span>dst[..<span class="number">13</span>], <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0xD83Du16</span>, <span class="number">0xDCA9u16</span>], <span class="kw-2">&amp;mut </span>dst[..<span class="number">13</span>], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::InputEmpty);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_buffer_end_utf16be() {
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_16BE.new_decoder_without_bom_handling();
<span class="kw">let </span><span class="kw-2">mut </span>dest = [<span class="number">0u8</span>; <span class="number">4</span>];
<span class="macro">assert_eq!</span>(
decoder.decode_to_utf8(<span class="kw-2">&amp;</span>[<span class="number">0xD8</span>, <span class="number">0x00</span>], <span class="kw-2">&amp;mut </span>dest, <span class="bool-val">false</span>),
(CoderResult::InputEmpty, <span class="number">2</span>, <span class="number">0</span>, <span class="bool-val">false</span>)
);
<span class="kw">let _ </span>= decoder.decode_to_utf8(<span class="kw-2">&amp;</span>[<span class="number">0xD8</span>, <span class="number">0x00</span>], <span class="kw-2">&amp;mut </span>dest, <span class="bool-val">true</span>);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_hash() {
<span class="kw">let </span><span class="kw-2">mut </span>encodings = ::alloc::collections::btree_set::BTreeSet::new();
encodings.insert(UTF_8);
encodings.insert(ISO_2022_JP);
<span class="macro">assert!</span>(encodings.contains(UTF_8));
<span class="macro">assert!</span>(encodings.contains(ISO_2022_JP));
<span class="macro">assert!</span>(!encodings.contains(WINDOWS_1252));
encodings.remove(ISO_2022_JP);
<span class="macro">assert!</span>(!encodings.contains(ISO_2022_JP));
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_iso_2022_jp_ncr_extra_from_utf16() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">17</span>];
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf16(<span class="kw-2">&amp;</span>[<span class="number">0x3041u16</span>, <span class="number">0xFFFFu16</span>], <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_iso_2022_jp_ncr_extra_from_utf8() {
<span class="kw">let </span><span class="kw-2">mut </span>dst = [<span class="number">0u8</span>; <span class="number">17</span>];
{
<span class="kw">let </span><span class="kw-2">mut </span>encoder = ISO_2022_JP.new_encoder();
<span class="kw">let </span>(result, <span class="kw">_</span>, <span class="kw">_</span>, <span class="kw">_</span>) =
encoder.encode_from_utf8(<span class="string">&quot;\u{3041}\u{FFFF}&quot;</span>, <span class="kw-2">&amp;mut </span>dst[..], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, CoderResult::OutputFull);
}
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_max_length_with_bom_to_utf8() {
<span class="kw">let </span><span class="kw-2">mut </span>output = [<span class="number">0u8</span>; <span class="number">20</span>];
<span class="kw">let </span><span class="kw-2">mut </span>decoder = REPLACEMENT.new_decoder();
<span class="kw">let </span>input = <span class="string">b&quot;\xEF\xBB\xBFA&quot;</span>;
{
<span class="kw">let </span>needed = decoder
.max_utf8_buffer_length_without_replacement(input.len())
.unwrap();
<span class="kw">let </span>(result, read, written) =
decoder.decode_to_utf8_without_replacement(input, <span class="kw-2">&amp;mut </span>output[..needed], <span class="bool-val">true</span>);
<span class="macro">assert_eq!</span>(result, DecoderResult::InputEmpty);
<span class="macro">assert_eq!</span>(read, input.len());
<span class="macro">assert_eq!</span>(written, <span class="number">1</span>);
<span class="macro">assert_eq!</span>(output[<span class="number">0</span>], <span class="number">0x41</span>);
}
}
<span class="attribute">#[cfg(feature = <span class="string">&quot;serde&quot;</span>)]
#[test]
</span><span class="kw">fn </span>test_serde() {
<span class="kw">let </span>demo = Demo {
num: <span class="number">42</span>,
name: <span class="string">&quot;foo&quot;</span>.into(),
enc: UTF_8,
};
<span class="kw">let </span>serialized = serde_json::to_string(<span class="kw-2">&amp;</span>demo).unwrap();
<span class="kw">let </span>deserialized: Demo = serde_json::from_str(<span class="kw-2">&amp;</span>serialized).unwrap();
<span class="macro">assert_eq!</span>(deserialized, demo);
<span class="kw">let </span>bincoded = bincode::serialize(<span class="kw-2">&amp;</span>demo).unwrap();
<span class="kw">let </span>debincoded: Demo = bincode::deserialize(<span class="kw-2">&amp;</span>bincoded[..]).unwrap();
<span class="macro">assert_eq!</span>(debincoded, demo);
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_is_single_byte() {
<span class="macro">assert!</span>(!BIG5.is_single_byte());
<span class="macro">assert!</span>(!EUC_JP.is_single_byte());
<span class="macro">assert!</span>(!EUC_KR.is_single_byte());
<span class="macro">assert!</span>(!GB18030.is_single_byte());
<span class="macro">assert!</span>(!GBK.is_single_byte());
<span class="macro">assert!</span>(!REPLACEMENT.is_single_byte());
<span class="macro">assert!</span>(!SHIFT_JIS.is_single_byte());
<span class="macro">assert!</span>(!UTF_8.is_single_byte());
<span class="macro">assert!</span>(!UTF_16BE.is_single_byte());
<span class="macro">assert!</span>(!UTF_16LE.is_single_byte());
<span class="macro">assert!</span>(!ISO_2022_JP.is_single_byte());
<span class="macro">assert!</span>(IBM866.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_2.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_3.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_4.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_5.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_6.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_7.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_8.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_10.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_13.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_14.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_15.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_16.is_single_byte());
<span class="macro">assert!</span>(ISO_8859_8_I.is_single_byte());
<span class="macro">assert!</span>(KOI8_R.is_single_byte());
<span class="macro">assert!</span>(KOI8_U.is_single_byte());
<span class="macro">assert!</span>(MACINTOSH.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_874.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1250.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1251.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1252.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1253.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1254.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1255.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1256.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1257.is_single_byte());
<span class="macro">assert!</span>(WINDOWS_1258.is_single_byte());
<span class="macro">assert!</span>(X_MAC_CYRILLIC.is_single_byte());
<span class="macro">assert!</span>(X_USER_DEFINED.is_single_byte());
}
<span class="attribute">#[test]
</span><span class="kw">fn </span>test_latin1_byte_compatible_up_to() {
<span class="kw">let </span>buffer = <span class="string">b&quot;a\x81\xB6\xF6\xF0\x82\xB4&quot;</span>;
<span class="macro">assert_eq!</span>(
BIG5.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
EUC_JP
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
EUC_KR
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
GB18030
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
GBK.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert!</span>(REPLACEMENT
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.is_none());
<span class="macro">assert_eq!</span>(
SHIFT_JIS
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
UTF_8
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert!</span>(UTF_16BE
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.is_none());
<span class="macro">assert!</span>(UTF_16LE
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.is_none());
<span class="macro">assert_eq!</span>(
ISO_2022_JP
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
IBM866
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_2
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_3
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_4
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_5
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_6
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_7
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_8
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">3
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_10
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_13
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_14
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_15
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">6
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_16
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
ISO_8859_8_I
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">3
</span>);
<span class="macro">assert_eq!</span>(
KOI8_R
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
KOI8_U
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
MACINTOSH
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_874
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">2
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1250
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1251
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1252
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">5
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1253
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">3
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1254
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1255
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">3
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1256
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1257
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
WINDOWS_1258
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">4
</span>);
<span class="macro">assert_eq!</span>(
X_MAC_CYRILLIC
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert_eq!</span>(
X_USER_DEFINED
.new_decoder_without_bom_handling()
.latin1_byte_compatible_up_to(buffer)
.unwrap(),
<span class="number">1
</span>);
<span class="macro">assert!</span>(UTF_8
.new_decoder()
.latin1_byte_compatible_up_to(buffer)
.is_none());
<span class="kw">let </span><span class="kw-2">mut </span>decoder = UTF_8.new_decoder();
<span class="kw">let </span><span class="kw-2">mut </span>output = [<span class="number">0u16</span>; <span class="number">4</span>];
<span class="kw">let _ </span>= decoder.decode_to_utf16(<span class="string">b&quot;\xEF&quot;</span>, <span class="kw-2">&amp;mut </span>output, <span class="bool-val">false</span>);
<span class="macro">assert!</span>(decoder.latin1_byte_compatible_up_to(buffer).is_none());
<span class="kw">let _ </span>= decoder.decode_to_utf16(<span class="string">b&quot;\xBB\xBF&quot;</span>, <span class="kw-2">&amp;mut </span>output, <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(decoder.latin1_byte_compatible_up_to(buffer), <span class="prelude-val">Some</span>(<span class="number">1</span>));
<span class="kw">let _ </span>= decoder.decode_to_utf16(<span class="string">b&quot;\xEF&quot;</span>, <span class="kw-2">&amp;mut </span>output, <span class="bool-val">false</span>);
<span class="macro">assert_eq!</span>(decoder.latin1_byte_compatible_up_to(buffer), <span class="prelude-val">None</span>);
}
}
</code></pre></div>
</section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="encoding_rs" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>