1
0
-1

hi 

how to store Arabic text in database from a text box (get from Joget form), because a validation error comes. i don't change all language on the form, please

 

    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      Problem resolved by changing the Database Charter set for latin1 to utf8 and also change the Table and column 

      now the create table script is some thing like that

       

      CREATE TABLE `app_fd_video_New` (
      `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
      `c_field1` longtext COLLATE utf8_unicode_ci,
      `c_field2` longtext COLLATE utf8_unicode_ci,
      PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

      Regards,

       

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Sir its error in log 

         

        ERROR 02 Jul 2018 12:08:13 org.hibernate.engine.jdbc.spi.SqlExceptionHelper - (conn:118) Incorrect string value: '\xD9\x83\xD8\xA3\xD8\xB3...' for column 'c_field1' at row 1
        ERROR 02 Jul 2018 12:08:13 org.joget.apps.form.service.FormService - Error executing store binder
        org.hibernate.exception.GenericJDBCException: could not execute statement
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
        at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)

        .....

        and in the last 

         

        Caused by: java.sql.SQLException: Incorrect string value: '\xD9\x83\xD8\xA3\xD8\xB3...' for column 'c_field1' at row 1
        Query is: insert into app_fd_video_New (dateCreated, dateModified, createdBy, createdByName, modifiedBy, modifiedByName, c_field1, c_field2, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?), parameters ['2018-07-02 12:08:13.67','2018-07-02 12:08:13.67','admin','Admin Admin','admin','Admin Admin','كأس العالم: اليوم في الكلمات: يوم 17','fdgdf','59d205e5-7f001010-1c028fdb-9c1f6f87']
        at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:146)
        at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:215)
        at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal_aroundBody6(MariaDbPreparedStatementClient.java:212)
        ... 227 more

          CommentAdd your comment...
        1.  
          1
          0
          -1

          Hi,

          I just tested and managed to store Arabic text using Text Area in Joget form, with the default system locale. Did you see any error in tomcat log?

            CommentAdd your comment...