uPortal
  1. uPortal
  2. UP-3488

Preferences : encoding pb with postgresql - UTF-8 non ascii characters

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 4.1.2, 4.2.0, 4.2.1, 4.2.2, 4.3.0, 4.3.1
    • Fix Version/s: 4.0.16, 4.1.3, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 5.0.0
    • Component/s: Preferences
    • Labels:
      None
    • Environment:
      uPortal 4.0.5
      Postgresql 8.4
      jdk1.6.0_24
      8.4-701.jdbc4 or/and 9.0-801.jdbc4
      Debian Squeeze
      uPortal 4.3.2
      psql (PostgreSQL) 9.5.4

      Description

      If we save portlet preferences with non ascii characters (french accents for example), these characters are not correct when we get them back.

      select data from pg_catalog.pg_largeobject where loid='1261770'
      gives us
      """
      _De nouveaux services/portlets peuvent \352tre ajout\351s \340 votre page en cliquant sur 'Personnaliser'.
      """

      This problem with JPA/Hibernate, @Lob annotation and Postgresql seems to be critical and a known issue ... :
      CF http://stackoverflow.com/questions/5043992/postgres-utf-8-clobs-with-jdbc and related resources.

      Thanks for help.

        Issue Links

          Activity

          Hide
          Vincent Bonamy added a comment -

          Pull Request on github :
          We suggest yous use @type(type = org.hibernate.type.TextType) for @lob type.
          https://github.com/Jasig/uPortal/pull/47

          With that, we no longer use pg_catalog.pg_largeobject for preferences (like before the uPortal4 version).

          The problem of this modification here is : for the current portlet preferences saved on postgresql database, you have to make a migration ... like an export/import process.

          Show
          Vincent Bonamy added a comment - Pull Request on github : We suggest yous use @type(type = org.hibernate.type.TextType) for @lob type. https://github.com/Jasig/uPortal/pull/47 With that, we no longer use pg_catalog.pg_largeobject for preferences (like before the uPortal4 version). The problem of this modification here is : for the current portlet preferences saved on postgresql database, you have to make a migration ... like an export/import process.
          Hide
          Andrew Petro added a comment -

          Sounds like an important bug. Update affects-version so appears in relevant known-issues listings.

          Show
          Andrew Petro added a comment - Sounds like an important bug. Update affects-version so appears in relevant known-issues listings.
          Hide
          Christian Cousquer added a comment -

          In uPortal 4.3.2-rel-patches, Vincent Bonamy's patches works very well with applauncher (see screenshots).

          https://github.com/Jasig/uPortal/commit/ae0cc089ad3d55b2667e0a768d7e3d189b02731b

          Show
          Christian Cousquer added a comment - In uPortal 4.3.2-rel-patches, Vincent Bonamy's patches works very well with applauncher (see screenshots). https://github.com/Jasig/uPortal/commit/ae0cc089ad3d55b2667e0a768d7e3d189b02731b
          Hide
          Christian Cousquer added a comment - - edited

          encoding issue with postgres
          and resolution in uPortal < 5
          read the discussion between E. Dalquist and V. Bonamy in: https://github.com/Jasig/uPortal/pull/47

          Show
          Christian Cousquer added a comment - - edited encoding issue with postgres and resolution in uPortal < 5 read the discussion between E. Dalquist and V. Bonamy in: https://github.com/Jasig/uPortal/pull/47

            People

            • Assignee:
              Unassigned
              Reporter:
              Vincent Bonamy
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: