Project

General

Profile

Actions

Bug #6045

open

Morpho not correctly handling Chinese characters

Added by ben leinfelder almost 11 years ago. Updated about 10 years ago.

Status:
In Progress
Priority:
Normal
Category:
-
Target version:
-
Start date:
08/05/2013
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

Description

Hi Ben,

There is a Chinese display problem in Matacat 2.0.6 when the data package uploading from Morpho 1.10.0.
My colleague, Chen-Tsai Chiu, modified the XMLUtil.java(MORPHO_1_10_0/src/edu/ucsb/nceas/morpho/util/).
He add codes(red part) to the XMLUtil.jave as following.

 boolean escape = false;
                        if (!escape) {
                                // do not do escape for true UTF-8 encoding
                                //str.append(ch);
                                str.append("&#");
                                str.append(Integer.toString(ch));
                                str.append(';');

                        } else {
                                // escape the special characters
                                // see http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5238
                                str.append("&#");
                                str.append(Integer.toString(ch));
                                str.append(';');
                        }

We can't make sure the way is correct but it works.
Does it happen in other language?

Thank you.

Meei-ru


Related issues

Related to Morpho - Bug #5238: Use UTF-8 for file reading and writingResolvedben leinfelder11/11/2010

Actions
Actions #1

Updated by ben leinfelder almost 11 years ago

  • Description updated (diff)
Actions #2

Updated by ben leinfelder almost 11 years ago

We do not want to entity-encode special (Chinese) characters and instead want to use UTF-8 encoding. The mechanism in Moprho for posting data to the Metacat servlet was not properly specifying utf-8 character encoding.

This commit addresses that issue. You can build from this branch and test the fix. It may be a good idea to release a patch update of Morpho (v1.10.1) so that other users can benefit from this modification.

------
Author: leinfelder
Date: 2013-08-07 10:49:17 -0700 (Wed, 07 Aug 2013)
New Revision: 5731

Modified:
branches/MORPHO_1_10_0/src/edu/ucsb/nceas/morpho/Morpho.java
branches/MORPHO_1_10_0/src/edu/ucsb/nceas/morpho/framework/HttpMessage.java

Actions #3

Updated by ben leinfelder almost 11 years ago

  • Target version changed from 2.1.0 to 2.0.0
Actions #4

Updated by ben leinfelder over 10 years ago

  • Target version changed from 2.0.0 to 1.10.1

Looks like there's another issue with this in MetacatDataStore.

Actions #5

Updated by ben leinfelder about 10 years ago

  • Target version deleted (1.10.1)
Actions

Also available in: Atom PDF