You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "hxgdada (via GitHub)" <gi...@apache.org> on 2023/06/12 10:07:01 UTC

[GitHub] [iceberg] hxgdada opened a new issue, #7821: Encountered Chinese garbled code issue during Iceberg rest HTTP transmission

hxgdada opened a new issue, #7821:
URL: https://github.com/apache/iceberg/issues/7821

   ### Apache Iceberg version
   
   None
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   org.apache.iceberg.rest.HTTPClient
   
   origin:
       private StringEntity toJson(Object requestBody) {
           try {
               return new StringEntity(mapper.writeValueAsString(requestBody));
           } catch (JsonProcessingException e) {
               throw new RESTException(e, "Failed to write request body: %s", requestBody);
           }
       }
   
   After modification:
     private StringEntity toJson(Object requestBody) {
           try {
               return new StringEntity(mapper.writeValueAsString(requestBody), Charset.forName("UTF-8"));
           } catch (JsonProcessingException e) {
               throw new RESTException(e, "Failed to write request body: %s", requestBody);
           }
       }
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] danielcweeks closed issue #7821: [bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission

Posted by "danielcweeks (via GitHub)" <gi...@apache.org>.
danielcweeks closed issue #7821: [bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission
URL: https://github.com/apache/iceberg/issues/7821


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] hxgdada commented on issue #7821: [bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission

Posted by "hxgdada (via GitHub)" <gi...@apache.org>.
hxgdada commented on issue #7821:
URL: https://github.com/apache/iceberg/issues/7821#issuecomment-1614375891

   
   > This probably makes sense. @hxgdada do you have a small reproducible example?
   This is a case study where I used iceberg rest to create a table in trino and found that the Chinese fields became garbled. Through debugging, I found that the iceberg rest service converted the Chinese to a special encoding during HTTP protocol transmission. The screenshot is shown below. Subsequently, I added Charset. forName ("UTF-8") to the HTTP method of iceberg rest to solve this problem
   
   Before modification
   
   ![修改前](https://github.com/apache/iceberg/assets/97427881/c604a7d4-898c-4de4-991b-4d288f8b99ae)
   
   ![修改前建表](https://github.com/apache/iceberg/assets/97427881/8569dd42-ce4c-4057-845c-b3b6d2235472)
   
   ![修改前show表](https://github.com/apache/iceberg/assets/97427881/8e7a6b75-10b6-41dc-9765-9a654ac7ad0c)
   
   After modification
   ![修改后](https://github.com/apache/iceberg/assets/97427881/c052fdb7-eb7e-4b49-8d06-ebc51c9e8548)
   ![修改后建表](https://github.com/apache/iceberg/assets/97427881/1b91bb9d-64de-4922-a75d-43a4f92bcf14)
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on issue #7821: [bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #7821:
URL: https://github.com/apache/iceberg/issues/7821#issuecomment-1613242349

   This probably makes sense. @hxgdada do you have a small reproducible example?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] nastra commented on issue #7821: [bug] Encountered Chinese garbled code issue during Iceberg rest HTTP transmission

Posted by "nastra (via GitHub)" <gi...@apache.org>.
nastra commented on issue #7821:
URL: https://github.com/apache/iceberg/issues/7821#issuecomment-1632096802

   @hxgdada thanks for reporting this. I've opened #8046 that should fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org