Pergunta

so i am a bit stucked on this and i am also a bit lost. I have a GWT App and all .java files and everything is encoded in cp1250 (as default, from container) i tried to change encoding at my .html (because everything was in UTF-8)

 <meta http-equiv="content-type" content="text/html; charset=cp1250">

and also web.xml file,appengine-web.xml file and .gwt.xml file

<?xml version="1.0" encoding="utf-8"?>

to cp1250 but i cant get the encoding right, i need to display and store characters like áéžčťíóšľĺ... i also tried to change encoding of some .java files to ISO--8859-1 as well as in the .html and .xml files but nothing worked. I dont know EXACTLY what to change, so maybe thats my problem.

I use RPCs for text(String) transfer so i can get those characters from input to server side and write them with println() correctly, but i cant save them to datastore correctly.

So, is there a way to store such characters or show them in Labels etc. ? If yes, what should i do exactly ? Or storing in datastore and showing them only in com.google.gwt.user.client.ui.HTML would be sufficient as well, thanks a lot for your time.

Foi útil?

Solução

SOLUTION

Ok so basicaly what i was doing wrong was that default cp1250 enxoding. Just set the encoding on everything to UTF-8 and displaying and storing will be just fine, it will convert some of special characters in your code to "?" when u change it, but with a little bit of extra work you can change it back.

Sorry for the dumb question, but i though UTF-8 wasnt way to go... idk why :P

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top