-
1. Re: entering German
pstrotmann Jan 19, 2004 1:21 AM (in response to pstrotmann)Hi Folks
this is just a test reply to check entering German Umlauts ü,ä,ö from another browser (IE). It seems that the forum itself has the same problem in entering german Umlauts:
the Umlauts shouldn't look like this: ü,ä,ö,Ü,Ä,Ö,ß
after posting.
peter -
2. Re: entering German
jimbrady Oct 13, 2004 5:27 AM (in response to pstrotmann)Hi,
was a solution found to this - I have the same problem. I thought it was coming from Sitemesh but now I think JBOSS is the problem. The default encoding in Sitemesh supports umlauts.
There is a post on SITEMESH explaining what can be done http://www.opensymphony.com/sitemesh/charsets.html , but it seems like a lot of work to me!
Jim Brady -
3. Re: entering German
lviz Oct 13, 2004 6:37 AM (in response to pstrotmann)hello peter hello jim
we don't have any probs with umlauts..
in jsp's we use:<%@ page contentType="text/html;charset=ISO-8859-15" language="java" %>
and we changed the run.sh to:export LANG="de_DE@euro" export LC_ALL="de_DE@euro"
cheers
lothar -
4. Re: entering German
jimbrady Oct 13, 2004 10:17 AM (in response to pstrotmann)Lvis - I tried that and it didn't work for me.
I have eventually partially solved the problem in a way that I find unsatisfactory but is the only solution I can find.
I experimented quite a bit and found that the problem is only a problem for JSP (which I precompile). I found this link:
http://www.theserverside.com/discussions/thread.tss?thread_id=28944
And followed the advice of Thomas Aagaard Jensen (admittedly for a slightly different problem) ... and it worked almost perfectly. The only problem is that if MS-IE view, encoding has auto-select on it selects UTF-8 and not ISO-8859-1. If you set the autoselect off and select the Western European (ISO) it works perfectly. I tried using META HTTP-EQUIV etc but it didn't work.
Any tips appreciated.
Jim Brady -
5. Re: entering German
jimbrady Oct 13, 2004 10:21 AM (in response to pstrotmann)If you don't want to follow the link for Jensen's solution it is to add the following to every JSP page:
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %> -
6. Re: entering German
lviz Oct 13, 2004 11:33 AM (in response to pstrotmann)hi jim
thank you for the link to theserverside.
i followed the link and stumbled across the post from "Dilshad Salim"
and i looked at our pages:
we also have a meta-tag in every page:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
cheers
Lothar -
7. Re: entering German
french_c Oct 13, 2004 12:11 PM (in response to pstrotmann)Always ensure that your OS has the requested locale installed. In most cases (e.g. on Solaris) you are missing the locale.
See locale -a for unix boxes. -
8. Re: entering German
jimbrady Oct 14, 2004 5:22 AM (in response to pstrotmann)Hi all again,
I need to rethink this. The problem clearly occurs when the JSP is compiled. The only reliable way around it seems to be represent all the umlauts in the JSP by ä etc.
If anybody knows how I can get the JSPC (pre-)compiler to take UTF-8 text and store the literals as UTF-8 when the target is ISO-8859-1 please let me know. I may be wrong but it seems the compiler sees the target as ISO-8859-1 and stores the literal interpreting the UTF-8 text as though it was ISO-8859-1 and converting it back into UTF-8 - instead of storing a UTF-8 text string and then converting it first on output to ISO-8859-1. Is there a compiler option or JSP command to get around this? I am using the JASPER41 JSPC. The only alternative I can see is to include html snippets from html files! As I said before if I use
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1" %>
then it almost gets it right except the browser thinks it is getting UTF-8 instead on ISO-8859-1 and
I have to tell it otherwise at run time.
Jim Brady