In your shell session that runs the script, you need to set the value of the LANG variable to the correct locale to match your data (and that locale has to be installed in your operating system).
You can set this variable before you run the db2 export command. You can set the variable in your shell startup profile, or in your userprofile (of the Db2-instance, if you have one), or in your script as long as you make the variable exportable to subshells.
Usually it is convenient to have a system default locale and to arrange that every shell login session has the correct LANG setting automatic.
For example export LANG=de_DE.utf8 if your territory is German, and that locale is installed, and if your shell is bash or similar. If your territory is Switzerland or Austria, or other territory, look in your locale output to find the best match.
If your client operating system is MS-Windows, different configuration applies, as per the regional settings of MS-Windows, although in some cases setting DB2CODEPAGE=1208 environment variable for UTF-8 can help.
Keep in mind that the EXPORT command for db2 command line also supports syntax modified by codepage=x where x is a codepage number which can also help. Refer to the documentation. The aim is that either zero codepage conversion happens during the export (it can lead to data issues in the exported contents and possible loss of data), or that the codepage conversion finds correct matching / equivalent characters between the database-codepage and the client (i.e. your db2 CLP in your shell script) side application-codepage.
export LANG=de_DE.utf8if your territory is German, and that locale is installed, and if your shell is bash or similar.