<div dir="ltr">Hi Ayush,<div><br></div><div>In the latest UEFI 2.9 spec, it's specified under 2.3.1 that CHAR8 strings/characters are (usually) ASCII, and CHAR16 strings/characters are (usually) UCS-2 (*not* UTF-16).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 7, 2022 at 7:02 AM Ayush Singh <<a href="mailto:ayushdevel1325@gmail.com">ayushdevel1325@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello everyone, I am trying to write an implementation for UEFI<br>
strings in Rust and just wanted clarification about some things.<br>
<br>
Are UEFI Strings UTF-16 encoded? I have looked at some previous Rust<br>
implementations for this and it seems UEFI does not support the whole<br>
UTF-16 but rather only UCS-2<br>
(<a href="https://en.wikipedia.org/wiki/Universal_Coded_Character_Set" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Universal_Coded_Character_Set</a>) which is<br>
a subset of UTF-16.<br>
<br>
There is also something called WTF-8<br>
(<a href="https://en.wikipedia.org/wiki/UTF-8#WTF-8" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/UTF-8#WTF-8</a>) which Rust uses to<br>
represent OsStrings in Windows which is supposed to use UTF-16 (?).<br>
<br>
Anyway, if someone can point me to the resources/specifications of<br>
UEFI Strings, it would be a great help.<br>
<br>
Ayush Singh<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Pedro Falcato</div></div>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/90278">View/Reply Online (#90278)</a> |    |  <a target="_blank" href="https://groups.io/mt/91595087/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>