‎2007 Dec 27 8:07 AM
I want to create a UTF-8 file on Application Server.
Question 1:
I tried using statement 'Open dataset for output in text mode encoding utf-8'. The file was created. Then I used CL_ABAP_FILE_UTILITIES=>CHECK_UTF8 to check the encoding. 'A' was returned respresenting ASC.
Any suggestion on this?
Or is there any option to convert a ASC file to UTF-8?
Question 2:
After creating the file on Application Server, I used code below to check the encoding.
call method CL_ABAP_FILE_UTILITIES=>CHECK_UTF8
EXPORTING
file_name = fname
IMPORTING
encoding = encoding.
if encoding = CL_ABAP_FILE_UTILITIES=>ENCODING_UTF8.
write: / fname, 'File format is UTF-8.'.
else.
write: / fname, 'File format is not UTF-8.'.
endif.
When I was using this method to check a local file, i got error. can't this method do that?
Thanks.
Legend.
‎2007 Dec 28 8:14 AM
Our SAP server is Windows, is it possible to create a UFF-8 file?
I used parameter 'encoding UTF-8' while creating the file on App Server as above.
then I downloaded the file using 'Gui_download' with parameter codepage = 4110, then i got a UTF-8 file on local machine.
why utf-8 file wasn't created on App server?
too many questions here.
Thanks All.
Legend.