Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] Accented characters and ComboBox in New UI

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] Accented characters and ComboBox in New UI


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Yoann Delattre <>, "" <>
  • Subject: RE: [grouper-users] Accented characters and ComboBox in New UI
  • Date: Wed, 20 Aug 2014 14:41:59 +0000
  • Accept-language: en-US

When I use 2.2 without any changes, I created a folder with an accented character, I am using mysql, I did a search, and it sent the accented char to the DB (from p6spy).  Mysql by default will treat that accented char as an “e” I guess…  so you get more results than you think you should, but it seems to be working, right?  If you don’t convert input to utf8, will creating objects as utf8 still work?  I think there was something that wasn’t working that it helped with J

 

 

2014/08/20 10:35:46:840, 7ms, statement: ByHqlStatic.java.listSet() line 421, Hib3StemDAO.java.getAllStemsSecureHelper() line 1533, Hib3StemDAO.java.getAllStemsSecure() line 2132, StemFinder.java.findStems() line 628, UiV2Stem.java.search() line 1484, DojoComboLogic.java.logic() line 133, UiV2Stem.java.createGroupParentFolderFilter() line 1462, GrouperUtil.java.invokeMethod() line 3951, GrouperUtil.java.callMethod() line 3902, GrouperUiRestServlet.java.doGet() line 277, GrouperUiFilter.java.doFilter() line 985

   select distinct stem0_.id as id32_, stem0_.hibernate_version_number as hibernate2_32_, stem0_.parent_stem as parent3_32_, stem0_.name as name32_, stem0_.display_name as display5_32_, stem0_.creator_id as creator6_32_, stem0_.create_time as create7_32_, stem0_.modifier_id as modifier8_32_, stem0_.modify_time as modify9_32_, stem0_.display_extension as display10_32_, stem0_.extension as extension32_, stem0_.description as descrip12_32_, stem0_.last_membership_change as last13_32_, stem0_.alternate_name as alternate14_32_, stem0_.context_id as context15_32_, stem0_.id_index as id16_32_ from grouper_stems stem0_ where lower(stem0_.name) like '%ést%' or lower(stem0_.display_name) like '%ést%' or lower(stem0_.description) like '%ést%' or stem0_.id='ést' order by stem0_.display_name asc limit 200

2014/08/20 10:35:46:870, resultset: ALIASES: 0: id32_, 1: hibernate2_32_, 2: parent3_32_, 3: name32_, 4: display5_32_, 5: creator6_32_, 6: create7_32_, 7: modifier8_32_, 8: modify9_32_, 9: display10_32_, 10: extension32_, 11: descrip12_32_, 12: last13_32_, 13: alternate14_32_, 14: context15_32_, 15: id16_32_

2014/08/20 10:35:46:871, resultset: 0: 183821004210420fade310db3a72923f, 1: 0, 2: 267b5c51292a46c1bb1a2022a7b2fc68, 3: someStem, 4: someStem, 5: dc7cb1680c3c48bab2499cd3169f6418, 6: 1408003384426, 7: null, 8: 0, 9: someStem, 10: someStem, 11: null, 12: null, 13: null, 14: d1afb6813bde439a8a1ce05ce22d8e57, 15: 10160

2014/08/20 10:35:46:876, resultset: 0: f19aaeb3580f4aa499d67567b9da5947, 1: 0, 2: 267b5c51292a46c1bb1a2022a7b2fc68, 3: someStem3, 4: someStem3, 5: dc7cb1680c3c48bab2499cd3169f6418, 6: 1408004060711, 7: null, 8: 0, 9: someStem3, 10: someStem3, 11: null, 12: null, 13: null, 14: 92ece379ee5a484cbf1d234425c35a18, 15: 10171

2014/08/20 10:35:46:879, resultset: 0: 7e2672121fe0496ea27b0cf6d679b7c0, 1: 0, 2: 267b5c51292a46c1bb1a2022a7b2fc68, 3: test, 4: test, 5: dc7cb1680c3c48bab2499cd3169f6418, 6: 1400681869188, 7: null, 8: 0, 9: test, 10: test, 11: null, 12: null, 13: null, 14: 10f9212216b94b2abbaba6565e92caed, 15: 10031

 

From: [mailto:] On Behalf Of Yoann Delattre
Sent: Wednesday, August 20, 2014 9:26 AM
To:
Subject: [grouper-users] Accented characters and ComboBox in New UI

 

Hi everyone !

Actually, i'm working to get our grouper 2.2 ready for production (thanks again for your work on this version !).
Don't know if it's usefull but i had a problem with ComboBox in New UI. When i was trying to search a group/folder who contain an accented character, i had no result...

It was an encoding problem despiste the fact that UTF-8 is use everywhere...

The problem was the getParameter method (use in DojoComboLogic.java) in GrouperRequestWrapper.java, especially those lines (408 - 415) :

      if (param != null && StringUtils.equals("GET", this.getMethod()) && GrouperUiConfig.retrieveConfig().propertyValueBoolean("convertInputToUtf8", true)) {
        try {
          byte[] bytes = param.getBytes("ISO-8859-1");
          param = new String(bytes, "UTF-8");
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
      }

So i change convertInputToUtf8 to false in grouper-ui.properties and everything works now ! :-)

But if everything is in UTF-8, i don't know if this part of code is still useful ???

Maybe some people will have the same problem...That's why i share the solution :)

I hope this will help.

Yoann.

--

Yoann Delattre

03 20 95 69 61

Équipe SIAD (Systèmes d'Information et Aide à la Décision)
DSI de l'académie de Lille (Direction des Systèmes d'Information)
110 avenue Gaston Berger - 59000 Lille

 




Archive powered by MHonArc 2.6.16.

Top of Page