I am trying to set the Window title of a Maui application to be a value containing Unicode (say Japanese) characters. The Japanese characters (and other unicode characters) appear as '?'
I set the title as follows
protected override Window CreateWindow(IActivationState activationState)
{
Window window = base.CreateWindow(activationState);
window.Title = "Hello こんにちは World Test";
return window;
}
In a minimal Maui application ... this has the expected result.
In my much more complex application (with a bit of Windows specific behavior and API calls), the Japanese appears as ????.
My guess is that I am messing up the low-level window somehow.
What might cause this problem ?
Upon more investigation ... it seems that somehow the presence of a a lifecycle event causes the problem. I have a
builder.UseMauiApp<App>()
.ConfigureLifecycleEvents(events =>
{
events.AddWindows(win => win
.OnWindowCreated((window) => {
When I remove the event, the problem goes away. The event implementation itself was just an empty code block.
I cannot replicate this in a 'minimal' application