Application Development 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: 

ZIP with UTF-8

Former Member
0 Kudos

Hello,

I use the class cl_abap_zip to create the zip file and save it on the local desktop. It works correctly and the structure of the zip file is correct after unpacking. The problem appears when the name of the folder or the file inside the zip file has the German letter, for example “ß” or “ä”, in this case I get incorrect texts. I tried to convert file/folder name to UTF-8 using TREX_TEXT_TO_UTF8 but it gives again wrong results. Has anybody met similar problem?

Thank you,

Anna

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Anna,

In a unicode-system you could use this function module:

SCP_REPLACE_STRANGE_CHARS

to replace the mentioned characters.

I just use it like this:

call function 'SCP_REPLACE_STRANGE_CHARS'
    exporting
      intext                  = my_text_var
    importing
      outtext                 = my_text_var.

I suppose to push your filename trough this function and do some test with it.

regards,

Sven

2 REPLIES 2

Former Member
0 Kudos

Hello Anna,

In a unicode-system you could use this function module:

SCP_REPLACE_STRANGE_CHARS

to replace the mentioned characters.

I just use it like this:

call function 'SCP_REPLACE_STRANGE_CHARS'
    exporting
      intext                  = my_text_var
    importing
      outtext                 = my_text_var.

I suppose to push your filename trough this function and do some test with it.

regards,

Sven

Former Member
0 Kudos

Hello,

thank you, I have tried it and it seems that it recognizes the special caracters: it changes “ß" to "ss" and so on. Thank you!

Anna