* [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console.
@ 2023-03-17 12:19 Gerd Hoffmann
2023-03-22 16:20 ` [edk2-devel] " Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2023-03-17 12:19 UTC (permalink / raw)
To: devel
Cc: Pawel Polawski, Oliver Steffen, Gerd Hoffmann, Jordan Justen,
Jiewen Yao, Ard Biesheuvel
Time to leave behind relics from the last century and arrive in the
modern world. Drop PC-ANSI Terminal Type for the serial console, use
UTF-8 instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h | 4 ++--
OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
index 1676d61616d8..18b3deb9db59 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
@@ -126,7 +126,7 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
1 \
}
-#define gPcAnsiTerminal \
+#define gVtUtf8Terminal \
{ \
{ \
MESSAGING_DEVICE_PATH, \
@@ -136,7 +136,7 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
} \
}, \
- DEVICE_PATH_MESSAGING_PC_ANSI \
+ DEVICE_PATH_MESSAGING_VT_UTF8 \
}
#define gEndEntire \
diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
index 6536d9fe369e..c1801725c2c8 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
@@ -47,7 +47,7 @@ typedef struct {
ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode = gPnpPs2Keyboard;
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
UART_DEVICE_PATH gUartDeviceNode = gUart;
-VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;
+VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gVtUtf8Terminal;
//
// Platform specific keyboard device path
@@ -83,7 +83,7 @@ VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {
0, // Parity - Default
0, // StopBits - Default
},
- gPcAnsiTerminal,
+ gVtUtf8Terminal,
gEndEntire
};
@@ -168,7 +168,7 @@ STATIC VENDOR_UART_DEVICE_PATH gXenConsoleDevicePath = {
FixedPcdGet8 (PcdUartDefaultParity),
FixedPcdGet8 (PcdUartDefaultStopBits),
},
- gPcAnsiTerminal,
+ gVtUtf8Terminal,
gEndEntire
};
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console.
2023-03-17 12:19 [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console Gerd Hoffmann
@ 2023-03-22 16:20 ` Ard Biesheuvel
2023-03-22 16:31 ` Rebecca Cran
0 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2023-03-22 16:20 UTC (permalink / raw)
To: devel, kraxel
Cc: Pawel Polawski, Oliver Steffen, Jordan Justen, Jiewen Yao,
Ard Biesheuvel
On Fri, 17 Mar 2023 at 13:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Time to leave behind relics from the last century and arrive in the
> modern world. Drop PC-ANSI Terminal Type for the serial console, use
> UTF-8 instead.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
No objections here but how will I be able to observe the difference?
> ---
> OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h | 4 ++--
> OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
> index 1676d61616d8..18b3deb9db59 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
> @@ -126,7 +126,7 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
> 1 \
> }
>
> -#define gPcAnsiTerminal \
> +#define gVtUtf8Terminal \
> { \
> { \
> MESSAGING_DEVICE_PATH, \
> @@ -136,7 +136,7 @@ extern VENDOR_DEVICE_PATH gTerminalTypeDeviceNode;
> (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
> } \
> }, \
> - DEVICE_PATH_MESSAGING_PC_ANSI \
> + DEVICE_PATH_MESSAGING_VT_UTF8 \
> }
>
> #define gEndEntire \
> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> index 6536d9fe369e..c1801725c2c8 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> @@ -47,7 +47,7 @@ typedef struct {
> ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode = gPnpPs2Keyboard;
> ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
> UART_DEVICE_PATH gUartDeviceNode = gUart;
> -VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;
> +VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gVtUtf8Terminal;
>
> //
> // Platform specific keyboard device path
> @@ -83,7 +83,7 @@ VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {
> 0, // Parity - Default
> 0, // StopBits - Default
> },
> - gPcAnsiTerminal,
> + gVtUtf8Terminal,
> gEndEntire
> };
>
> @@ -168,7 +168,7 @@ STATIC VENDOR_UART_DEVICE_PATH gXenConsoleDevicePath = {
> FixedPcdGet8 (PcdUartDefaultParity),
> FixedPcdGet8 (PcdUartDefaultStopBits),
> },
> - gPcAnsiTerminal,
> + gVtUtf8Terminal,
> gEndEntire
> };
>
> --
> 2.39.2
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console.
2023-03-22 16:20 ` [edk2-devel] " Ard Biesheuvel
@ 2023-03-22 16:31 ` Rebecca Cran
2023-03-23 8:20 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: Rebecca Cran @ 2023-03-22 16:31 UTC (permalink / raw)
To: devel, ardb, kraxel
Cc: Pawel Polawski, Oliver Steffen, Jordan Justen, Jiewen Yao,
Ard Biesheuvel
On 3/22/23 10:20 AM, Ard Biesheuvel wrote:
> On Fri, 17 Mar 2023 at 13:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
>> Time to leave behind relics from the last century and arrive in the
>> modern world. Drop PC-ANSI Terminal Type for the serial console, use
>> UTF-8 instead.
>>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> No objections here but how will I be able to observe the difference?
I'm not sure if it's as simple as this or if it depends on the terminal,
TERM setting etc., but I saw a difference when I opened the UiApp and
opened the drop-down "Select Language".
Before the patch, it showed "Fran?ais", and after, "Français".
--
Rebecca Cran
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console.
2023-03-22 16:31 ` Rebecca Cran
@ 2023-03-23 8:20 ` Gerd Hoffmann
2023-03-23 9:18 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2023-03-23 8:20 UTC (permalink / raw)
To: Rebecca Cran
Cc: devel, ardb, Pawel Polawski, Oliver Steffen, Jordan Justen,
Jiewen Yao, Ard Biesheuvel
On Wed, Mar 22, 2023 at 10:31:32AM -0600, Rebecca Cran wrote:
> On 3/22/23 10:20 AM, Ard Biesheuvel wrote:
> > On Fri, 17 Mar 2023 at 13:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > > Time to leave behind relics from the last century and arrive in the
> > > modern world. Drop PC-ANSI Terminal Type for the serial console, use
> > > UTF-8 instead.
> > >
> > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > No objections here but how will I be able to observe the difference?
>
> I'm not sure if it's as simple as this or if it depends on the terminal,
> TERM setting etc.,
It does. It depends on the locale the terminal application is
running in. These days that is a utf-8 locale in 99% of the cases,
i.e. "de_DE.UTF-8" for me.
> but I saw a difference when I opened the UiApp and opened
> the drop-down "Select Language".
>
> Before the patch, it showed "Fran?ais", and after, "Français".
Yes, essentially everything which is not ascii shows correct now,
including the line-drawing characters which you can see in alot
of places in UiApp on the serial console.
take care,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console.
2023-03-23 8:20 ` Gerd Hoffmann
@ 2023-03-23 9:18 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-03-23 9:18 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: Rebecca Cran, devel, Pawel Polawski, Oliver Steffen,
Jordan Justen, Jiewen Yao, Ard Biesheuvel
On Thu, 23 Mar 2023 at 09:20, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Wed, Mar 22, 2023 at 10:31:32AM -0600, Rebecca Cran wrote:
> > On 3/22/23 10:20 AM, Ard Biesheuvel wrote:
> > > On Fri, 17 Mar 2023 at 13:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > > > Time to leave behind relics from the last century and arrive in the
> > > > modern world. Drop PC-ANSI Terminal Type for the serial console, use
> > > > UTF-8 instead.
> > > >
> > > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > > No objections here but how will I be able to observe the difference?
> >
> > I'm not sure if it's as simple as this or if it depends on the terminal,
> > TERM setting etc.,
>
> It does. It depends on the locale the terminal application is
> running in. These days that is a utf-8 locale in 99% of the cases,
> i.e. "de_DE.UTF-8" for me.
>
> > but I saw a difference when I opened the UiApp and opened
> > the drop-down "Select Language".
> >
> > Before the patch, it showed "Fran?ais", and after, "Français".
>
> Yes, essentially everything which is not ascii shows correct now,
> including the line-drawing characters which you can see in alot
> of places in UiApp on the serial console.
>
Merged as #4164 - thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-23 9:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 12:19 [PATCH 1/1] OvmfPkg/PlatformBootManagerLib: use utf8 for the serial console Gerd Hoffmann
2023-03-22 16:20 ` [edk2-devel] " Ard Biesheuvel
2023-03-22 16:31 ` Rebecca Cran
2023-03-23 8:20 ` Gerd Hoffmann
2023-03-23 9:18 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox