Hi,
I have a simple GWT application that uses both Messages and Constant
interfaces to do the internationalization. I want to show danish
special characters like "æ" in my danish version.
1.)Bellow is my Messages version.
Interface
-----------------------------------------------------
package it.codegen.tbx.client;
import com.google.gwt.i18n.client.Messages;
public interface LocaleMsgs extends Messages{
String hellow();
}
Property file named as LocaleMsgs_da.properties
----------------------------------------------------
hellow : Vælg
Usage
--------------------------------------------------
private final LocaleMsgs oMsgs = GWT.create(LocaleMsgs.class);
oMsgs.hellow();
module.gwt.xml filw
--------------------------------------------------
<inherits name="com.google.gwt.i18n.I18N"/>
<extend-property values="fr" name="locale" />
<extend-property values="da" name="locale"/>
But when requesting the page with lacale=da it gives me some illegal
character for "æ" charactor. I tried both utf-8 and iso-8859-1for both
host page and eclipse "text file encoding". But it gives some illegal
data.
This is same for the Constants version.
How can i solve this problem. Please help me.
2.) I have a UiBinder which dynamically loads danish special
characters like "æ". But after rendering to the browser it also gives
me the illegal data. This is in the same module i mentioned above. So
the module.gwt.xml files are the same. I don't have any place to
specify the char-set i'm using in the UiBinder.
This is my ui.xml file
------------------------------
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<g:HTMLPanel>
<div class="wtFtTb">
<g:SimplePanel
ui:field="flightSectorDiv"></g:SimplePanel>
</div>
</g:HTMLPanel>
</ui:UiBinder>
Here is my java code for UIBinder
-----------------------------------
public class Flight extends Composite {
private static FlightUiBinder uiBinder =
GWT.create(FlightUiBinder.class);
interface FlightUiBinder extends UiBinder<Widget, Flight> {
}
@UiField SimplePanel flightSectorDiv;
public Flight() {
initWidget(uiBinder.createAndBindUi(this));
flightSectorDiv.setInnerHTML("København » Milano");
--------------------------------------------------------------------
After rendering to the browser it displays the illegal data for "ø"
and "»" characters. In this also i tried both iso-8859-1 and utf-8 in
the host page. But it didn't work. Special case is, if i use static
special characters in the UiBinder it get rendered correctly. So i
think this happens when loading dynamic data.
How can i solve this problem. Please help me.
Thanks,
Kahawala.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.