2 Replies Latest reply on Jun 24, 2019 3:29 AM by zhurlik

    chatset UTF-8 WILDFLY 17

    gcabrera2

      hey, some body can help me? I need configure de Undertow and each Aplication Server tu use charset to UTF-8, couse when i trying to save some information that conains some special charset like "Corazón", is is saved to database whit strange characters ñike "Coraz??n"

        • 1. Re: chatset UTF-8 WILDFLY 17
          ehugonnet

          Run the following cli operation so that UTF-8 will become trhe default encoding.

          /subsystem=undertow/servlet-container=default:write-attribute(name="default-encoding" value="utf-8")

           

          please check alos that your database is using UTF-8 ENCODING.

          • 2. Re: chatset UTF-8 WILDFLY 17
            zhurlik

            Hi,

             

            There are 2 places that should be checked:

             

            1. web - you have to read about either HttpFilter or Wildfly system variables to be able to set default encoding

            That's needed for getting a correct string via http

            2. jdbc - when you will see that after http call you are having the correct string, you need to double check that your data-source in the standalone.xml has correct parameters/jdbc-url, it depends on your database
            That's needed for sending a correct string to db

            Thanks,

            Vlad