Blazored / Toast

A JavaScript free toast library for Blazor and Razor Component applications
https://blazored.github.io/Toast/
MIT License
663 stars 92 forks source link

[Bug] Umlauts (ä, ö, ü) are not supported #141

Closed schnickalodeon closed 2 years ago

schnickalodeon commented 3 years ago

Description

I am developing an blazor wasm application in German. Thereby I noticed that umlauts (ä, ö, ü) are currently not supported. The other parts of the application display them correctly (compare screenshots).

Potential Fix

Maybe the plugin or the font does not support UTF-8.

Screenshot

How it looks like image

How it looks at other parts of the app image

Code

Calling component

 protected async Task HandleDeleteResult(HttpResponseMessage response)
    {        
        var successMessage = "Fahrlehrer erfolgreich gelöscht";
        var successTitle = "Löschen erfolgreich!";
        var errorTitle = "Fehler beim Löschen!";
        await HandleResult(response, successMessage, successTitle, errorTitle);
        _teacherToDelete = null;
    }

    protected async Task HandleResult(HttpResponseMessage response, string successMessage, string successTitle, string errorTitle)
    {
        if (response.IsSuccessStatusCode)
        {
            toasts.ShowSuccess(successMessage,successTitle);
            await LoadTeacher();
        }
        else
        {
            toasts.ShowError(response.ReasonPhrase,errorTitle);
        }
    }

MainLayout.razor

@using Blazored.Toast.Configuration
@inherits LayoutComponentBase

<div class="page">
    <div class="sidebar">
        <NavMenu />
    </div>

    <div class="main">      
        <div class="content px-4">
            @Body
        </div>
        <BlazoredToasts Position="ToastPosition.TopCenter"
                        Timeout="4"
                        IconType="IconType.FontAwesome"
                        ShowProgressBar="true"
                        SuccessClass="success-toast-override"
                        SuccessIcon="oi oi-thumb-up"
                        ErrorIcon="oi oi-bug" />
    </div>
</div>

Thank you for your work and the project. I like it a lot :)

MrGeneric commented 3 years ago

Hi @schnickalodeon, I downloaded the sample projects and tested with the text you provided. The umlauts display for me, so I think the issue is somewhere else.

image

schnickalodeon commented 2 years ago

Well then it's my issue. Sorry ^^