Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #965 (closed task: fixed)

Opened 2 years ago

Last modified 10 months ago

Mongolian cyrillic characters don't entirely work

Reported by: djazayeri Assigned to: nribeka
Priority: minor Milestone: (Completed) OpenMRS 1.4
Component: OpenMRS Code Base Keywords:
Cc: Erdenechimeg, <erdenechimeg@dot.mn>, jornbraa@gmail.com Introductory Ticket: 0
Code Review Status:

Description

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.)
    1. This is because the url redirected to is incorrectly escaped: http://localhost:8080/openmrs/admin/patients/newPatient.form?addName=D&#1257;rius%20Jaza&#1199;eri&addBirthdate=&addAge=30&addGender=M
  2. Actually creating a patient with those letters in the name: SORT OF WORKS
    1. The name actually saved in the database is: D&#1257;rius. Thus viewing that patient record it appears correct on the screen.
  3. Searching for a patient with odd letters in their name: BROKEN
    1. Because the name in the DB has &#1257; in it, doing the DWR search for ө breaks.

Attachments

unicode.patch (4.4 kB) - added by nribeka on 01/23/09 09:46:50.
Initial patch for the unicode character support

Change History

08/12/08 17:56:41 changed by djazayeri

  • cc set to Erdenechimeg, <erdenechimeg@dot.mn>, jornbraa@gmail.com.

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. :-)

01/22/09 06:28:31 changed by nribeka

  • intro_ticket changed.
  • review_status changed.

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

01/22/09 15:00:35 changed by djazayeri

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

01/23/09 09:41:59 changed by nribeka

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

01/23/09 09:46:50 changed by nribeka

  • attachment unicode.patch added.

Initial patch for the unicode character support

01/27/09 18:52:19 changed by bwolfe

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?

01/27/09 19:15:12 changed by nribeka

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

URIEncoding="UTF-8"

01/27/09 19:16:28 changed by nribeka

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

01/27/09 20:23:00 changed by bwolfe

  • owner changed from somebody to nribeka.

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.

01/31/09 15:57:50 changed by nribeka

Ben, how about adding

useBodyEncodingForURI="true"

instead of

URIEncoding="UTF-8"

02/05/09 21:17:05 changed by bwolfe

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...

02/12/09 10:22:18 changed by nribeka

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

useUnicode=true&characterEncoding=UTF-8

02/19/09 14:36:06 changed by bwolfe

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

Darius, is this worth backporting to 1.4 ?

02/21/09 19:00:17 changed by djazayeri

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".

02/23/09 15:36:26 changed by bwolfe

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from OpenMRS 1.4 to OpenMRS 1.5.

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.

05/29/09 15:38:54 changed by dthomas

  • milestone changed from OpenMRS 1.5 to OpenMRS 1.4.

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