Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

OpenMRS Trunk

Mongolian cyrillic characters don't entirely work

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Could Could
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: OpenMRS 1.4.0
  • Component/s: None
  • Severity:
    3
  • Keywords:
  • Description:
    Hide

    I tried creating a patient whose name has the following two characters in it: ө ү

    Some things work, some don't.

    1. 'Add new patient', then type the name, then click 'Create Person': BROKEN. (Everything after the first odd character in the name is lost when you get to the next page, as are age and gender.)
    2. This is because the url redirected to is incorrectly escaped: http://localhost:8080/openmrs/admin/patients/newPatient.form?addName=D&TRAC-1257;rius%20Jaza&TRAC-1199;eri&addBirthdate=&addAge=30&addGender=M
    3. Actually creating a patient with those letters in the name: SORT OF WORKS
    4. The name actually saved in the database is: D&TRAC-1257;rius. Thus viewing that patient record it appears correct on the screen.
    5. Searching for a patient with odd letters in their name: BROKEN
    6. Because the name in the DB has &TRAC-1257; in it, doing the DWR search for ө breaks.
    Show
    I tried creating a patient whose name has the following two characters in it: ө ү Some things work, some don't.
    1. 'Add new patient', then type the name, then click 'Create Person': BROKEN. (Everything after the first odd character in the name is lost when you get to the next page, as are age and gender.)
    2. This is because the url redirected to is incorrectly escaped: http://localhost:8080/openmrs/admin/patients/newPatient.form?addName=D&TRAC-1257;rius%20Jaza&TRAC-1199;eri&addBirthdate=&addAge=30&addGender=M
    3. Actually creating a patient with those letters in the name: SORT OF WORKS
    4. The name actually saved in the database is: D&TRAC-1257;rius. Thus viewing that patient record it appears correct on the screen.
    5. Searching for a patient with odd letters in their name: BROKEN
    6. Because the name in the DB has &TRAC-1257; in it, doing the DWR search for ө breaks.
  1. unicode.patch
    (4 kB)
    Burke Mamlin
    2009-01-23 09:46:50 EST

Activity

Hide
Darius Jazayeri added a comment - 2008-08-12 17:56:41 EDT

When this is fixed please email: Erdenechimeg <erdenechimeg@dot.mn> and jornbraa@gmail.com

(They're added to the CC, but they may delete automated trac emails without reading them.

Show
Darius Jazayeri added a comment - 2008-08-12 17:56:41 EDT When this is fixed please email: Erdenechimeg <erdenechimeg@dot.mn> and jornbraa@gmail.com (They're added to the CC, but they may delete automated trac emails without reading them.
Hide
Nyoman Ribeka added a comment - 2009-01-22 06:28:31 EST

Do this means we will add support for UTF-8 charset?

Show
Nyoman Ribeka added a comment - 2009-01-22 06:28:31 EST Do this means we will add support for UTF-8 charset?
Hide
Darius Jazayeri added a comment - 2009-01-22 15:00:35 EST

Yes, I think we need to support having names, concept names, etc, in the full UTF-8 character set.

Show
Darius Jazayeri added a comment - 2009-01-22 15:00:35 EST Yes, I think we need to support having names, concept names, etc, in the full UTF-8 character set.
Hide
Nyoman Ribeka added a comment - 2009-01-23 09:41:59 EST

I think there are several thing that needs to be done:

  • Add filter to the spring filter chain
  • Set the encoding of the jsp file
  • According to tomcat wiki we also need to update server.xml to support UTF-8
Show
Nyoman Ribeka added a comment - 2009-01-23 09:41:59 EST I think there are several thing that needs to be done:
  • Add filter to the spring filter chain
  • Set the encoding of the jsp file
  • According to tomcat wiki we also need to update server.xml to support UTF-8
Hide
Nyoman Ribeka added a comment - 2009-01-23 09:46:50 EST

Initial patch for the unicode character support

Show
Nyoman Ribeka added a comment - 2009-01-23 09:46:50 EST Initial patch for the unicode character support
Hide
Ben Wolfe added a comment - 2009-01-27 18:52:19 EST

nribeka. This isn't working for me without any other modifications. You said you did some tomcat/conf/server.xml changes. What were those? Any luck in finding a work-around to that?

Show
Ben Wolfe added a comment - 2009-01-27 18:52:19 EST nribeka. This isn't working for me without any other modifications. You said you did some tomcat/conf/server.xml changes. What were those? Any luck in finding a work-around to that?
Hide
Nyoman Ribeka added a comment - 2009-01-27 19:15:12 EST

Ben, you need to add the following to the server.xml:

URIEncoding="UTF-8"
Show
Nyoman Ribeka added a comment - 2009-01-27 19:15:12 EST Ben, you need to add the following to the server.xml:
URIEncoding="UTF-8"
Hide
Nyoman Ribeka added a comment - 2009-01-27 19:16:28 EST

The above lines need to be added as the HTTP Connector tag's attributes in the server.xml file.

Show
Nyoman Ribeka added a comment - 2009-01-27 19:16:28 EST The above lines need to be added as the HTTP Connector tag's attributes in the server.xml file.
Hide
Ben Wolfe added a comment - 2009-01-27 20:23:00 EST

Great, that makes things work for the redirection from that first page. However, when I save the patient with that in their name, I still get a question mark saved instead of the "ө" character.

Show
Ben Wolfe added a comment - 2009-01-27 20:23:00 EST Great, that makes things work for the redirection from that first page. However, when I save the patient with that in their name, I still get a question mark saved instead of the "ө" character.
Hide
Nyoman Ribeka added a comment - 2009-01-31 15:57:50 EST

Ben, how about adding

useBodyEncodingForURI="true"

instead of

URIEncoding="UTF-8"
Show
Nyoman Ribeka added a comment - 2009-01-31 15:57:50 EST Ben, how about adding
useBodyEncodingForURI="true"
instead of
URIEncoding="UTF-8"
Hide
Ben Wolfe added a comment - 2009-02-05 21:17:05 EST

The url still works with that, but saving utf8 characters is still giving me a question mark.

Whats weird, is I remember testing this on the plane and it worked for me, but I think the patch might have only been half applied...

Show
Ben Wolfe added a comment - 2009-02-05 21:17:05 EST The url still works with that, but saving utf8 characters is still giving me a question mark. Whats weird, is I remember testing this on the plane and it worked for me, but I think the patch might have only been half applied...
Hide
Nyoman Ribeka added a comment - 2009-02-12 10:22:18 EST

Modifying the database URL connection string step is missing. I thought I already put it here

useUnicode=true&characterEncoding=UTF-8
Show
Nyoman Ribeka added a comment - 2009-02-12 10:22:18 EST Modifying the database URL connection string step is missing. I thought I already put it here
useUnicode=true&characterEncoding=UTF-8
Hide
Ben Wolfe added a comment - 2009-02-19 14:36:06 EST

Added to trunk in rev:6942 and will be in the 1.5 release for sure. Thanks Nyoman!

Darius, is this worth backporting to 1.4 ?

Show
Ben Wolfe added a comment - 2009-02-19 14:36:06 EST Added to trunk in rev:6942 and will be in the 1.5 release for sure. Thanks Nyoman! Darius, is this worth backporting to 1.4 ?
Hide
Darius Jazayeri added a comment - 2009-02-21 19:00:17 EST

I don't think we need to backport to 1.4, but can you please email the two addresses mentioned above in the ticket saying "this is fixed and will be in the 1.5 release".

Show
Darius Jazayeri added a comment - 2009-02-21 19:00:17 EST I don't think we need to backport to 1.4, but can you please email the two addresses mentioned above in the ticket saying "this is fixed and will be in the 1.5 release".
Hide
Ben Wolfe added a comment - 2009-02-23 15:36:26 EST

Ok, closing this for the 1.5 milestone. See http://openmrs.org/wiki/Using_UTF8_Characters for how to set up your tomcat environment to work with UTF-8 characters.

Show
Ben Wolfe added a comment - 2009-02-23 15:36:26 EST Ok, closing this for the 1.5 milestone. See http://openmrs.org/wiki/Using_UTF8_Characters for how to set up your tomcat environment to work with UTF-8 characters.
Hide
Dave Thomas added a comment - 2009-05-29 15:38:54 EDT

sorry, chicos. I need this in 1.4. changeset:8107

Show
Dave Thomas added a comment - 2009-05-29 15:38:54 EDT sorry, chicos. I need this in 1.4. changeset:8107

People

Dates

  • Created:
    2008-08-07 11:25:34 EDT
    Updated:
    2010-07-08 16:21:07 EDT
    Resolved:
    2010-07-01 22:42:17 EDT