Re: Load file without losing Undo's [74352]

2020-10-22 Tema obsahu Professor Bernd
Hi, vbr.

When I tried to read a file with obj.OpenTextFile(... TristateTrue) as Unicode,
I always got an empty string. :-O


After that I suddenly thought that my INI routines also work with
obj.OpenTextFile(). I thought that this code would also generate errors now.
During a test I created a test key with ö ä ü ß ... using VBScript
obj.OpenTextFile() from an INI and output it with "Echo strText". Everything was
fine, the characters were all displayed as stored in the INI.

So it seems to be due to the different encodings when strText is written to the
editor via VBScript. - Interesting - But I've been working on it for far too
long.

I'm currently trying to integrate an AutoIt COM server into PSPad. First tries
look good. 

Thanks for your valuable support!

-- 

PSPad freeware editor https://www.pspad.com


Re: PSPad unicode 5.0.4 (531) English [74351]

2020-10-22 Tema obsahu Gabriel ACE
hi! new translate to spanish!

https://forum.pspad.com/read.php?5,74350


Best regards

-- 

PSPad freeware editor https://www.pspad.com


PSPad unicode 5.0.4 (531) - Spanish [74350]

2020-10-22 Tema obsahu Gabriel ACE
hi!/Hola!

new translate/ nueva traduccion

only for 30 days!/ solo por 30 dias!

http://ge.tt/2bScAG83



best regards!/Saludos!

-- 

PSPad freeware editor https://www.pspad.com


Re: Load file without losing Undo's [74349]

2020-10-22 Tema obsahu Vlastimil Brom
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
ConstantValue   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

-- 

PSPad freeware editor https://www.pspad.com