Hello,
I am making a watch face and I am encountering an issue with special chars to write the month name (august => août in French).
On the sim, the "û" letter is not displayed correctly. The encoding of all the files is "UTF-8".
dc.drawText( (WIDTH / 2)-60, ((HEIGHT/2)-50), Graphics.FONT_SYSTEM_XTINY,getDate(), Graphics.TEXT_JUSTIFY_CENTER);
//get the date private function getDate() as String { var today = Gregorian.info(Time.now(), Time.FORMAT_MEDIUM); var dateString = Lang.format("$1$ $2$ $3$", [ today.day_of_week, today.day, today.month, ] ); return dateString; }
To check where the issue comes from I tried :
- using a System.println("dateString"); and the debug console doesn't show the expected chars.
- replace the line :
dc.drawText( (WIDTH / 2)-60, ((HEIGHT/2)-50), Graphics.FONT_SYSTEM_XTINY,getDate(), Graphics.TEXT_JUSTIFY_CENTER);by
dc.drawText( (WIDTH / 2)-60, ((HEIGHT/2)-50), Graphics.FONT_SYSTEM_XTINY,"û", Graphics.TEXT_JUSTIFY_CENTER);I can read "û" chars on the sim.
Can anyone explain me the stuff that I have to change in order to edit the special char with success please?
I thank you in advance,
Christophe