8 Replies Latest reply on Oct 14, 2004 5:22 AM by jimbrady

    entering German "Umlaut" like ü,ä,ö....

    pstrotmann Newbie

      Hi,

      I'm just migrating an application from websphere to jboss, everything is working fine except the handling of "Umlaut" ü,ä,ö,.... If I enter ü the browser echoes some strange unreadable characters. In websphere the problem is solved by setting client.encoding.override=UTF-8 in a file called server.xml.
      Is there something analogous in jboss to overcome the problem?

      Peter



        • 1. Re: entering German
          pstrotmann Newbie

          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 Newbie

            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
              Lothar Egger Newbie

              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 Newbie

                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 Newbie

                  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
                    Lothar Egger Newbie

                    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
                      Jens Schumann Newbie

                      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 Newbie

                        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 &auml 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