I want to create a UTF-8 file on Application Server.
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?
After creating the file on Application Server, I used code below to check the encoding.
call method CL_ABAP_FILE_UTILITIES=>CHECK_UTF8
file_name = fname
encoding = encoding.
if encoding = CL_ABAP_FILE_UTILITIES=>ENCODING_UTF8.
write: / fname, 'File format is UTF-8.'.
write: / fname, 'File format is not UTF-8.'.
When I was using this method to check a local file, i got error. can't this method do that?