You are here: PSPad forum > English discussion forum > Unwanted 'automatic' encoding change by PsPad project on file open

Unwanted 'automatic' encoding change by PsPad project on file open

#1 Unwanted 'automatic' encoding change by PsPad project on file open

Posted by: Extranjero | Date: 2021-08-21 17:41 | IP: IP Logged

I've an archive (maybe more archives ...) containing strings like "¶¬" or "µ¬".

I'm using this 'strange characters' combination as separators/ids in 'custom dictionaries' because in 'real life' these combinations rather exist, and when they are eliminated in keys and values before creating the dictionary ...

Opening the file with some text-editor, all ok.
Opening the file with PsPad, sometimes, ok but mostly popping up a warning window saying file 'contains broken UTF-8 encoding. Do you want to open it?'
If u confirm the warning window with NO, pops up an error message, saying file cannot be opened.
In this case PsPad looses the ability to access the file from the left project file list (clicking it) until PsPad is restarted.
If PsPad is restarted generally the atempt to open the file, terminates in popping up the warning window saying file 'contains broken UTF-8 encoding' ...

Selecting from the file-explorer-window on the left 'open with Notepad' works fine, 'open with PsPad' ends up with the warning window saying file 'contains broken UTF-8 encoding' ...

If u confirm the warning window 'contains broken UTF-8 ..' with YES, File Encoding changes from ANSI Western European (1552) to Unicode UTF-8 no BOM (65001), but in the Encoding menu still remains selected 'ANSI Western European (1552)'. The characters of the 'rare' strings are converted in �, putting back the file encoding to ANSI Western European (1552) by clicking the encoding information on the bottom of the PsPad program window, saving the file with ANSI Western European (1552) encoding, results that on reopening the archive, it stays in ANSI Western European (1552) and the � signs are converted in standard ? signs.

Clicking on file-info and statistics throws an

Access violation at address 00007FFB1100A525 in module 'KERNELBASE.dll'. Read of address 000000000000073C.

... which can be closed without PsPad to crash and opening the window with the file-info: Words count zero, lines count 47 (see image)

Windows 10 Pro 64bit, PsPad(64) 5.0.7 (681) used from extern disk (crete project from folder on start) same effects downgrading to 649 ... but in times when 649 was latest version it didn't happen.

image

BTW: reopening such a lot of times PsPad I noticed that selecting 'Create Project from Directory' the 'Project Default Directory' search window on each new search opens a little bit more down-right ... smiling smiley
And I remember the times when the Program Default Directory there was scrolled in the view, and in Dark Theme the search window is bright ... but these are not important details.

Options: Reply | Quote | Up ^


#2 Re: Unwanted 'automatic' encoding change by PsPad project on file open

Posted by: pspad | Date: 2021-08-22 18:08 | IP: IP Logged

Hello

Don't open it as UTF-8, but open is as ANSI. In this case PSPad opens your file as Notepad.
Mixing UTF-8 encodig with ANSI encoding isn't good idea.

PSPad detects UTF-8 encoding automatically but can't open it directly as UTF-8, cause there are non UTF-8 encoded chars. Version 5.0.7 will ask you and you can decide, if you want to open it as UTF-8 or not.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR