Professor Bernd:
--------------------------------------------------------------------------------
...
_If you load the new file in VBScript_ ...

- ... with WSH functions (fso.OpenTextFile, ...) it is read as ASCII and
characters are displayed wrong (ö ä ü ß ...).
...
--------------------------------------------------------------------------------


Hi, I somehow thought, the things would be much complicated...
just in case (but I do think, it won't be new for You either...),

could it be, that OpenTextFile can be made to return unicode?
I am not sure, whether it is relevant for this case (VBScript via WSH), but
according to:
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-he
lp/opentextfile-method

the "format" argument might do this (if ommited, ASCII is apparently used).
"""
object.OpenTextFile (filename, [ iomode, [ create, [ format ]]])
...
The format argument can have any of the following settings:
SETTINGS
Constant        Value   Description
TristateUseDefault      -2      Opens the file by using the system default.
TristateTrue    -1      Opens the file as Unicode.
TristateFalse   0       Opens the file as ASCII.
"""

It seems strange, that the VB functions wouldn't allow for explicitely saving
and reading a file using a given encoding, but I don't have much experience in
this area.

Anyway, if all this doesn't work, probably some extra support for the scripting
interface in PSPad  would be needed.

regards,
   vbr

-- 
<https://forum.pspad.com/read.php?2,74331,74349>
PSPad freeware editor https://www.pspad.com

Odpovedet emailem