PigDump does not properly output Chinese UTF8 characters - they are displayed 
as question marks ??

                 Key: PIG-771
                 URL: https://issues.apache.org/jira/browse/PIG-771
             Project: Pig
          Issue Type: Bug
            Reporter: David Ciemiewicz

PigDump does not properly output Chinese UTF8 characters.

The reason for this is that the function Tuple.toString() is called.

DefaultTuple implements Tuple.toString() and it calls Object.toString() on the 
opaque object d.

Instead, I think that the code should be changed instead to call the new 
DataType.toString() function.

    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (Iterator<Object> it = mFields.iterator(); it.hasNext();) {
            Object d = it.next();
            if(d != null) {
                if(d instanceof Map) {
                    sb.append(DataType.mapToString((Map<Object, Object>)d));
                } else {
                    sb.append(DataType.toString(d));  // <<< Change this one 
                    if(d instanceof Long) {
                    } else if(d instanceof Float) {
            } else {
            if (it.hasNext())
        return sb.toString();

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to