Acknowledged

utf-8 and string resources

i have a problem with german umlauts (öäü) in string resources:

whenever i get the app from the ciq store (iq file) i only get "?" instead of umlauts while it works fine when i sideload the app or test in the simulator.

this happened before (see https://forums.garmin.com/developer/connect-iq/i/bug-reports/connect-mobile-and-utf-8-for-app-settings) and seemed to be fixed with SDK 3.2.3 but now using SDK 4.1.7 it re- appeared...

Parents
  • since i still cant seem to figure this out i put together a very simple test app and it show i was wrong about this being related to string resources - i also get "?" for all umlauts coming from inside the app (layout.xml, strings.xml or a source file).

    Here the code:

    using Toybox.Application;
    using Toybox.WatchUi;
    using Toybox.Graphics as Graphics;
    import Toybox.Lang;
    
    class umlautTestApp extends Application.AppBase {
        function initialize() {
            AppBase.initialize();
        }
        function getInitialView() {
            return [ new umlautView(), new WatchUi.BehaviorDelegate() ];
        }
    
    }
    
    class umlautView extends WatchUi.View {
        function initialize() {
            View.initialize();
        }
        function onLayout(dc) {
            setLayout(Rez.Layouts.MainLayout(dc));
        }
        function onUpdate(dc) {
            (View.findDrawableById("text3") as WatchUi.TextArea).setText("ÄÖÜäöü");
            View.onUpdate(dc);
        }
    }
    

    <layout id="MainLayout">
     <label id="text1" x="center" y="30%" color="Graphics.COLOR_RED" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="@Strings.umlaut" />
     <label id="text2" x="center" y="50%" color="Graphics.COLOR_GREEN" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="ÄÖÜäöü" />
     <label id="text3" x="center" y="70%" color="Graphics.COLOR_BLUE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="" />
    </layout>⏎                 

    <strings>
        <string id="AppName">umlautTest</string>
        <string id="umlaut">Rez: äöüÄÖÜ</string>
    </strings>

    This still works fine for the sideloaded .prg and in the simulator but if i install the app from ciq store (beta so far but i can publish if anyone is interested...) i get "?" for the umlauts in all 3 text fields.

Comment
  • since i still cant seem to figure this out i put together a very simple test app and it show i was wrong about this being related to string resources - i also get "?" for all umlauts coming from inside the app (layout.xml, strings.xml or a source file).

    Here the code:

    using Toybox.Application;
    using Toybox.WatchUi;
    using Toybox.Graphics as Graphics;
    import Toybox.Lang;
    
    class umlautTestApp extends Application.AppBase {
        function initialize() {
            AppBase.initialize();
        }
        function getInitialView() {
            return [ new umlautView(), new WatchUi.BehaviorDelegate() ];
        }
    
    }
    
    class umlautView extends WatchUi.View {
        function initialize() {
            View.initialize();
        }
        function onLayout(dc) {
            setLayout(Rez.Layouts.MainLayout(dc));
        }
        function onUpdate(dc) {
            (View.findDrawableById("text3") as WatchUi.TextArea).setText("ÄÖÜäöü");
            View.onUpdate(dc);
        }
    }
    

    <layout id="MainLayout">
     <label id="text1" x="center" y="30%" color="Graphics.COLOR_RED" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="@Strings.umlaut" />
     <label id="text2" x="center" y="50%" color="Graphics.COLOR_GREEN" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="ÄÖÜäöü" />
     <label id="text3" x="center" y="70%" color="Graphics.COLOR_BLUE" justification="Graphics.TEXT_JUSTIFY_CENTER" font="Graphics.FONT_SYSTEM_SMALL" text="" />
    </layout>⏎                 

    <strings>
        <string id="AppName">umlautTest</string>
        <string id="umlaut">Rez: äöüÄÖÜ</string>
    </strings>

    This still works fine for the sideloaded .prg and in the simulator but if i install the app from ciq store (beta so far but i can publish if anyone is interested...) i get "?" for the umlauts in all 3 text fields.

Children
No Data