[edk2-devel] Need clarification about UEFI Strings

2022-06-06 Thread Ayush Singh
Hello everyone, I am trying to write an implementation for UEFI strings in Rust and just wanted clarification about some things. Are UEFI Strings UTF-16 encoded? I have looked at some previous Rust implementations for this and it seems UEFI does not support the whole UTF-16 but rather only UCS-2 (

Re: [edk2-devel] Need clarification about UEFI Strings

2022-06-07 Thread Pedro Falcato
Hi Ayush, 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). On Tue, Jun 7, 2022 at 7:02 AM Ayush Singh wrote: > Hello everyone, I am trying to write an implementation for U

Re: [edk2-devel] Need clarification about UEFI Strings

2022-06-07 Thread Ayush Singh
Thanks, Pedro, However, according to the specs, it is possible to construct ASCII Strings as well. So when would ASCII Strings be used over normal UCS-2 Strings? Ayush Singh On Tue, Jun 7, 2022 at 1:13 PM Pedro Falcato wrote: > > Hi Ayush, > > In the latest UEFI 2.9 spec, it's specified under 2

Re: [edk2-devel] Need clarification about UEFI Strings

2022-06-07 Thread Pedro Falcato
I'd say that it depends. But 98% of the strings you'll find in UEFI (including APIs) are UCS-2 CHAR16 strings. On Tue, Jun 7, 2022 at 9:19 AM Ayush Singh wrote: > Thanks, Pedro, > > However, according to the specs, it is possible to construct ASCII > Strings as well. So when would ASCII Strings

Re: [edk2-devel] Need clarification about UEFI Strings

2022-06-07 Thread Ayush Singh
Ok, Thanks for all the help. On Tue, Jun 7, 2022 at 3:28 PM Pedro Falcato wrote: > > I'd say that it depends. But 98% of the strings you'll find in UEFI > (including APIs) are UCS-2 CHAR16 strings. > > On Tue, Jun 7, 2022 at 9:19 AM Ayush Singh wrote: >> >> Thanks, Pedro, >> >> However, accordi

Re: [edk2-devel] Need clarification about UEFI Strings

2022-06-29 Thread Ayush Singh
Just for clarification, UCS2 and not UTF-16 means there are no surrogate pairs right? Ayush Singh On Tue, Jun 7, 2022 at 5:15 PM Ayush Singh via groups.io wrote: > > Ok, Thanks for all the help. > > On Tue, Jun 7, 2022 at 3:28 PM Pedro Falcato wrote: > > > > I'd say that it depends. But 98% of