I wrote a snippet and not working with national characters. The \"A törzsszám\"... text appear \"törzsszám\" with my loginstatus field.
Main html:
Ups,... I tried some solutions:
1.solution: change the encoding properties in login.dart from utf-8 to ISO-8859-2
2.solution: I created another file (consts.dart)
class consts {
static String loginstatus_err8 = "A törzsszám legfeljebb 8 számjegyből áll!";
static String loginstatus_OK = "Belépve";
static String loginstatus_emptytorzsszam = "A törzsszámot ki kell tölteni";
}
I used this in login.dart, and it worked :) I'm happy.
...
loginstatus=consts.loginstatus_err8;
} else {
loginstatus=consts.loginstatus_OK;
...
A while ago I posted the code for a <safe-html>
tag at HTML Tags Within Internationalized Strings In Polymer.dart (original form Bind content containing html tags)
Using this polymer element shows proper characters.
Your login.html would then look like:
<link rel="import" href="../packages/safe_html/safe_html.html">
<polymer-element name="login-element" attributes="loginrow">
<template>
...
<div>
<input type="text" value="{{torzsszam}}">
...
<br>
<span>(<safe-html model="{{loginstatus}}></safe-html>)</span>
</div>
</template>
<script type="application/dart" src="login.dart"></script>
</polymer-element>