14 Replies Latest reply on Jun 7, 2007 9:10 AM by kukeltje

    utf problem

    fuligj

      When I try to use hungarian characters in a xhtml file, i receive an error message:

      Invalid byte 2 of 4-byte UTF-8 sequence.

      How could I solve this probelm?

      Thanks!

        • 1. Re: utf problem

          Wrong forum.
          Set the character encoding in the <?xml header.

          • 2. Re: utf problem
            fuligj

            When try to save a character like 'é' in websale's input field, the character changed to 'é'.
            How could i resolve this problem?
            Thanks!

            • 3. Re: utf problem

              There's an encoding mismatch somewhere.

              You need to be clearer about where you're seeing the bogus characters. In the database? On the screen?

              It looks like somewhere UTF-8 is being interpreted as Latin-1 (or whatever it's called these days).

              -Ed Staub

              • 4. Re: utf problem
                fuligj

                Thanks for reply!

                In the database the variable saved as 'é'. When i try to get strings from database, contains 'áéó...', they are show up fine. Could it be, that the #{var['...']} variables dosen't support utf-8? Other something else..

                Thank You!

                • 5. Re: utf problem

                  This is just a guess...

                  Try setting Java system property
                  file.encoding
                  to
                  UTF-8

                  Typically using -D on command line of whatever's running the app.

                  -Ed Staub

                  • 6. Re: utf problem
                    fuligj

                    Thanks again for reply.

                    I have added the "-Dfile.encoding=UTF-8" property to JAVA_OPTS in server/bin/run.bat, but unfortunately nothing has changed. Is that what you exactly suggested?

                    • 7. Re: utf problem

                      I'm guessing at this point.
                      The next thing I'd check is the database.
                      What are you using?
                      Have you checked whether the columns holding strings can deal with UTF-8?
                      Also, if the database doesn't know from UTF-8, what you saw there might well be correct, if it's just saving the 2-byte characters as 2 1-byte characters - it may be upconverted back to Unicode on the way out. Are the characters messed up when displayed through the app, also?

                      Sorry I can't be more helpful - anyone else?

                      -Ed Staub

                      • 8. Re: utf problem
                        fuligj

                        I'am using MySQL, but I tried it in an original suite with HSQL too, but the problem was the same. I think this is not the database's mistake, because I can display any special character in the webapp, that stored in db.

                        Could anyone help me?
                        Thanks!

                        • 9. Re: utf problem
                          fuligj

                          Any idea to solve this problem?

                          • 10. Re: utf problem
                            kukeltje
                            • 11. Re: utf problem
                              fuligj

                              I put the useBodyEncodingForURI="true" tag to the referred place, but nothing has changed. In deploy directory there is a jbossweb-tomcat55.sar instead of jboss-web.deployer.

                              • 12. Re: utf problem
                                jump

                                add -Dfile.encoding=UTF-8 to eclipse.ini

                                • 13. Re: utf problem
                                  fuligj

                                  I added it to the ini file, started the eclipse, saved my xhtml file as and redeploy my process, but nothing has has changed.

                                  • 14. Re: utf problem
                                    kukeltje

                                    maybe it is a problem in the jbpm converters (if used) Try putting some additional debug statements in the jbpm sourcecode and start from there to see where the strings are still good and where they go wrong