HTML-Renderer icon indicating copy to clipboard operation
HTML-Renderer copied to clipboard

Problem with uppercase Umlaut

Open sven5 opened this issue 7 years ago • 5 comments

Hi,

currently we're facing an issue with capitalized German Umlauts.

Ü will be written as lower-case ü and not Ü

Suggested resolution: Ü must be uppercase Ü and only ü should be lowercase ü.

The same with Ä and Ö

Thanks Sven

sven5 avatar Feb 13 '18 16:02 sven5

image

sven5 avatar Feb 13 '18 17:02 sven5

Hi @sven5 i was able to trace down this issue to the following line: HtmlUtils.cs#48

It's raised by StringComparer.InvariantCultureIgnoreCase but a fix wouldn't be that easy by replacing it with StringComparer.InvariantCulture because there are other entities in the list that wouldn't get matched if you change it.

Example:   wouldn't match

Maybe i find some time in the next days and split the lists and modify the DecodeHtmlCharByName method to solve this issue.

ohaucke avatar Feb 13 '18 20:02 ohaucke

Hi Oliver,

thanks for your time to look into the issue. It would be great if we can have a fix in the next days.

Best Regards Sven

sven5 avatar Feb 14 '18 09:02 sven5

I've tested my modifications and it looks fine but i'm not sure if is the way we should go (implement a second case sensitive map for special entities).

Maybe we should consider to switch to System.Net.WebUtility.HtmlDecode but i do not know what side effects that would have (Mono/.Net 2/etc).

Any way, i'll post the "quick" fix later on to solve this.

ohaucke avatar Feb 14 '18 11:02 ohaucke

sorry guys, need sometime to restore my workspace after a long time task

Licshee avatar Feb 19 '18 00:02 Licshee