Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem while uploading Japanese character to application server

abdul_hakim
Active Contributor
0 Likes
1,182

Hi Experts,

I have a text file which contains Japanese character. when i try uploading the file directly to application server using tcode CG3Z the Japanese characters are getting replaced with some symbols. But when i read the text file using GUI_UPLOAD and then write it back to the application server japanese characters are getting displayed. what could be the issue here? how this can be resolved?

warm regards,

abdul hakim

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
669

In case of CG3Z, internally there is a call to the FM 'C13Z_FILE_UPLOAD_ASCII' where you'll see this statement:

* open dataset for writing
  OPEN DATASET i_file_appl FOR OUTPUT MESSAGE e_os_message
               IN TEXT MODE ENCODING NON-UNICODE.

Please note the ENCODING addition is set to NON-UNICODE. But in your custom code you must be using ENCODING DEFAULT which sets the encoding to UTF-8 format because of which the Japanese characters are represented correctly.

Hope this helps.

BR,

Suhas

Hi Experts,

I have a text file which contains Japanese character. when i try uploading the file directly to application server using tcode CG3Z the Japanese characters are getting replaced with some symbols. But when i read the text file using GUI_UPLOAD and then write it back to the application server japanese characters are getting displayed. what could be the issue here? how this can be resolved?

warm regards,

abdul hakim

1 REPLY 1
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
670

In case of CG3Z, internally there is a call to the FM 'C13Z_FILE_UPLOAD_ASCII' where you'll see this statement:

* open dataset for writing
  OPEN DATASET i_file_appl FOR OUTPUT MESSAGE e_os_message
               IN TEXT MODE ENCODING NON-UNICODE.

Please note the ENCODING addition is set to NON-UNICODE. But in your custom code you must be using ENCODING DEFAULT which sets the encoding to UTF-8 format because of which the Japanese characters are represented correctly.

Hope this helps.

BR,

Suhas