01-10-2008 7:12 AM
Hi,
i use the function GUI_DOWNLOAD to download a .txt file. i use the codepage 4310 and the txt file encodes as UTF-8. now i want to encode the .txt file as unicode so that we can open it using EXCEL without broken characters.
Anyone can tell me which codepage can i use?
Thanks.
qiuguo
01-10-2008 7:19 AM
Hi
pass the following parameters only
U have to use DAT filetype
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = NUMBYTES
FILENAME = FILEPATH
FILETYPE = 'DAT'
TABLES
DATA_TAB = PDFDATA
Narendra
01-10-2008 7:19 AM
Hi
pass the following parameters only
U have to use DAT filetype
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = NUMBYTES
FILENAME = FILEPATH
FILETYPE = 'DAT'
TABLES
DATA_TAB = PDFDATA
Narendra
01-10-2008 7:28 AM
Narendra,
thanks for your reply.
I try it as you said, but the .txt file was encoded as ANSI.
I need unicode.
thanks.
qiuguo
01-10-2008 7:54 AM
Hi qiuguo,
UTF-8 is used for Unicode...Do you need UTF-16 codepage ?
Regards,
Mohaiyuddin
01-10-2008 8:07 AM
Hi,
Maybe i didn't describe the question clearly.
My problem is that i download a .txt file on local and open it. then i use the menu file - > save as, it would pop a window, on the bottom of which there will be the code type.
the code type list includes ANSI , UNICODE, UNICODE BIGENDIAN AND UTF-8. now i want the code type as UNICODE ,but use the codetype 4310 it would be UTF-8.
Pls help me.
qiuguo
01-10-2008 8:56 AM
Hi,
the following is the code:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = F_INFILE
filetype = 'ASC'
APPEND = ' '
write_field_separator = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
CODEPAGE = '4310' "4310
IMPORTING
FILELENGTH =
TABLES
data_tab = TAB_DATA
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
.
hope your help. thanks.
qiuguo
09-07-2010 7:33 AM
11-26-2010 8:26 AM
11-26-2010 3:01 PM