CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
184 stars 65 forks source link

[Xamarin UWP] BalloonPopup with German characters in title/description doesn't work #488

Closed SuNNjek closed 2 years ago

SuNNjek commented 2 years ago

I'm trying to create a BalloonPopup that contains text in German. The German alphabet contains some "special" characters on top of all the letters in the English alphabet, i.e. ä/Ä, ö/Ö, ü/Ü and ß/ẞ. However, when either the text or the description of the BalloonPopup contains any of these characters, it doesn't get displayed on UWP.

The code I'm using to create the popup is as follows:

_activePopup = new BalloonPopup(
    point.GetPos(),
    GetStyleForMarker(_activeMarker),
    _activeMarker.Label ?? String.Empty,
    _activeMarker.Text ?? String.Empty
);

_popupLayerDataSource.Add(_activePopup);

where _popupLayerDataSource is a LocalVectorDataSource

When I try to display a text without umlauts it looks like this: grafik

When I change the "Hauptstrasse" into "Hauptstraße" however, nothing happens on UWP, even though the code above gets called correctly: grafik

On Android and iOS it works correctly: grafik

mtehver commented 2 years ago

Thanks for reporting this. Indeed, I have reproduced this. Unfortunately this is a rather general issue and not only related to popups. Unicode string marshalling via PInvoke works differently in UWP vs Xamarin. I will try to fix this in SDK 4.4.5, currently planned for end of Q1.

mtehver commented 2 years ago

@SuNNjek RC1 of SDK 4.4.5 is now available and includes the fix for this.

mtehver commented 2 years ago

Closing this, fix is included in 4.4.5, which is now released.