my PUB source gets encrypted in ver26 - Forum

Forum Navigation
You need to log in to create posts and topics.

my PUB source gets encrypted in ver26

I was working on a project in version 21 and I opened and saved that project's PUB file in new version 26.

Now the PUB file seems to be encrypted.

.

It originally looked like this:

ShowErrors=No
ReturnTime=60
StartupAction=HideMenuItem "MenuHeading1"¶HideMenuItem "MenuHeading2"¶HideMenuItem "MenuHeading3"¶HideMenuItem "MenuHeading4"¶HideMenuItem "MenuHeading5"¶HideMenuItem "MenuHeading6"¶HideMenuItem "MenuHeading7"¶HideMenuItem

Now it looks like this:

ShowErrors=No
ReturnTime=60
StartupAction=~VNU8:486964654D656E754974656D20224D656E7548656164696E673122C2B6486964654D656E754974656D20224D656E7548656164696E673222C2B6486964654D656E754974656D20224D656E7548656164696E673322C2B6486964654D656E754974656D20224D656E7548656164696E673422C2B6486964654D656E754974656D20224D656E7548656164696E673522C2B6486964654D656E754974656D20224D656E7548656164696E673622C2B6486964654D656E754974656D20224D656E7548656164696E673722C2B6486964654D656E754974656D20224D656E7548656164696E673822C2B64869

The compiled app gives me "Out of Memery" errors and freezes or crashes.

 

@fkapnist
That's quite strange.
Please press F2 and let me know the exact VisualNEO Web date and compilation version you are using.
Thank you!

fkapnist has reacted to this post.
fkapnist
Quote from luishp on September 28, 2026, 10:00 am

@fkapnist
That's quite strange.
Please press F2 and let me know the exact VisualNEO Web date and compilation version you are using.
Thank you!

I use VisualNEO Web version 25.10.17 (registered version)

But my problem is with VisualNEO Win :

If I make a pub from VisualNEO Win version 21.9.9
and I open and save it in the new version 26.8.8 (English, 2026-08-31, unregistered trial)
the pub source code becomes strangely encrypted. (with 'StartupAction=~VNU8:'). It still works and compiles to exe, but I can't proof-read it in Notepad. Why is that? How can it be decrypted back to normal?

Thanks

.

Quote from luishp on September 28, 2026, 10:00 am

@fkapnist
That's quite strange.
Please press F2 and let me know the exact VisualNEO Web date and compilation version you are using.
Thank you!

I just made a test pub with the old version of VisualNEO Win. And then I opened and saved it in the new version. The resulting pub is not encrypted. It is readable. Just fine. So it seems VisualNEO Win is not cuasing the encryption. My old project file pubs are triggering the encryption. Maybe becuse I have html/js/css embedded into them?

Some help would be appreciated. Thanks.

.

 

 

Quote from luishp on September 28, 2026, 10:00 am

@fkapnist
That's quite strange.
Please press F2 and let me know the exact VisualNEO Web date and compilation version you are using.
Thank you!

I asked Claude and it solved the issue. It also produced a Python script to restore my old pubs:

When I moved my pub files from VisualNEO Win version 21 to the new version 26, the text in my saved pubs is encrypted with '~VNU8: ' at the start of each encrypted text block. Why is this? How do I remove the ecryption so I can read my pub files?

I couldn't find any documentation of the `~VNU8:` prefix, so what follows is an informed guess rather than a confirmed answer.

**Why it's probably happening**

It most likely isn't encryption. It looks like a Unicode marker. "VN" probably stands for VisualNEO and "U8" for UTF-8. VisualNEO Win 26.8.8 expanded Unicode support throughout the interface, object captions, variables, editors, files and project data. Older versions saved text in the ANSI code page. The new version seems to flag text blocks that contain non-ASCII characters (accented letters, Greek, symbols and so on) and store them in an encoded UTF-8 form, so the .pub file stays plain 7-bit text. The prefix tells the new version how to decode the text when it loads.

**What to check**

1. **Open the pub in VisualNEO Win 26 itself.** If this is the encoding, the editor should decode the text automatically, so your captions and actions display normally there. The official site says the modern edition retains the readable .pub project format and continues to load existing applications and classic plug-ins. If the text looks right in the editor, nothing is broken. It's only the raw file that looks odd.
2. **Look at what follows the prefix.** If it's a run of `%C3%A9`-style sequences, it's percent-encoded UTF-8. If it's only letters, digits, `+` and `/`, possibly ending in `=`, it's Base64. If it's pairs of hex digits, it's hex-encoded UTF-8. Any of these can be decoded with a text tool or a short script. If you paste me one short example block (a line or two, nothing sensitive), I can tell you which it is and give you a decoder.
3. **Ask on the VisualNEO forum.** Luis, the developer, answers questions there. The 26.8.8 thread is the right place to ask exactly what `~VNU8:` means and whether there's a setting to save pubs as readable ANSI or plain UTF-8.

**Before you try anything**

Keep your original v21 pub files untouched, and work on copies. Don't hand-edit or bulk-decode the v26 files and then resave them, because the new version may expect the prefix and could mishandle the result.

Are your texts mostly plain English or do they contain accented or non-Latin characters? That would help confirm the Unicode explanation.

It is long strings of hex digits.  Here is a sample: ObjAction=~VNU8:46696C6545786973747320225B54656D704469725D4472616744726F7046696C652E696E692220225B4444695D22C2B6496620225B4444695D22202


That confirms it: **it's not encryption, just hex-encoded UTF-8.** Each pair of hex digits is one byte of text, so `46 69 6C 65` is `File`. The prefix `~VNU8:` tells VisualNEO Win 26 that what follows is UTF-8 in hex. Your v21 files stored the same text in plain ANSI.

Decoded, your sample reads (with `¶` marking line breaks, which is the separator VisualNEO uses inside `ObjAction`):

```
FileExists "[TempDir]DragDropFile.ini" "[DDi]"
If "[DDi]" "=" "True"
hpwIniRead "[TempDir]DragDropFile.ini" "General" "Title" "" "[ixi]"
SetVar "[LoadedVideo]" "[ixi]"
GoSub "LoadVideo"
EndIf
FileExists "[TempDir]Drag3DropFile.ini" "[DDi]"
If "[DDi]" "=" "True"
hpwIniRead "[TempDir]DrageDropFile.ini" "General" "Title" "" "[ixi]"
FileErase "[TempDir]Drag3DropFile.ini"
.SetVar "[LoadedVideo]" "[ixi]"
.GoSub "LoadVideo"
.EndIf
...............
.hpwIniRead "[TempDir]DragDropFile.ini" "General" "Title" "" "[ixi]"
.AlertBox "" "[ixi]"
.FileErase "[TempDir]DragDropFile.ini"
.GoSub "[ixi]"
.EndIf
```

The leading dots are just indentation. The `C2B6` you keep seeing is the UTF-8 encoding of `¶`.

**Decoding a whole file**

This Python script decodes every `~VNU8:` block in a pub and writes a readable copy, leaving the original untouched:

```python
import re, sys

src = sys.argv[1]
dst = src + ".decoded.txt"

with open(src, "r", encoding="utf-8", errors="replace") as f:
    text = f.read()

def decode(m):
    raw = bytes.fromhex(m.group(1))
    return raw.decode("utf-8", errors="replace").replace("¶", "\n    ")

out = re.sub(r"~VNU8:([0-9A-Fa-f]+)", decode, text)

with open(dst, "w", encoding="utf-8") as f:
    f.write(out)
print("Wrote", dst)
```

Run it with `python decode_pub.py "MyProject.pub"`.

If a pub file itself isn't UTF-8 (older files sometimes aren't), change `encoding="utf-8"` on the first `open` to `"cp1253"` (Greek) or `"cp1252"`.

**Two cautions**

- The decoded file is for reading only. Don't load it back into VisualNEO, because v26 expects its own format.
- Your v21 originals stay the safest backup. Since v26 reads the encoded files natively, the projects should open and run normally in the editor.

I can also write a small tkinter tool that decodes a pub with a file picker, if you'd prefer that to the command line.

Thanks.

.

luishp, Vadim and dglojnar have reacted to this post.
luishpVadimdglojnar

Claude gave me a new python script to edit pub files that are encoded in garbled unicode. It allows you to read the encoded blocks as plain text, make search and replace edits, and then re-encode the pub back to unicode.

pub_editor.py is a single tool that decodes a pub, lets you find and replace, and re-encodes it to a new pub. I tested the decode, edit and re-encode logic on a sample pub with Greek text and Windows line endings. I couldn’t open the window here, so the buttons themselves are untested.

How to use it

Run pub_editor.py and click Open .pub.... Every ~VNU8: block is decoded and shown between ⟦ and ⟧ markers on a light blue background.
Type what to find and what to replace it with. Find Next, Replace, Replace All and Highlight All work on the whole file, and Ctrl+Z undoes a Replace All.
Click Save re-encoded .pub as... to write a new file. The original is never overwritten.

Things to know

Don’t delete or add the ⟦ ⟧ markers. They show where each encoded block starts and ends, and the tool refuses to save if they get damaged.
Each VisualNEO action line inside a block ends with ¶. If you add a new action line, type ¶ at the end of it before pressing Enter. The tool warns you if you add a line break without one.
Blocks you don’t edit are written back identical to the original, so only the blocks you changed are re-encoded.
Line endings and the file’s text encoding are preserved. The tool also warns if you add non-ASCII text outside the encoded blocks, because VisualNEO normally keeps those parts plain.

here is the download   https://www.awareware.com/pub_editor.zip

I hope this helps.

.

Required plugins:
https://neobooker.ru/forum/37-3706-1
https://neobooker.ru/forum/37-3759-1

Action
faUTF8toWin1251
Converts a UTF-8 string to the Win1251 encoding. For this reason, you should likely comment out this line if you are using a non-Russian system. If you do so, the text will become unreadable in its UTF-8 encoded form.
To fix this, simply copy the text from the input field into a text editor and change the text encoding to UTF-8. The text will then become readable, allowing you to search through it or modify it directly within the text editor.

Uploaded files:
luishp, Vadim and fkapnist have reacted to this post.
luishpVadimfkapnist

@luishp

Why were these complications introduced? Can’t things just be set back to how they were?
The .pub file is encoded in UTF-8, so any text within it will display correctly.

fkapnist has reacted to this post.
fkapnist
Quote from mishem on October 30, 2026, 8:41 pm

@luishp

Why were these complications introduced? Can’t things just be set back to how they were?
The .pub file is encoded in UTF-8, so any text within it will display correctly.

This happens to me only when NEO Win version 26 loads old pub files containing text in Greek or non-ASCII characters (accented letters, symbols and so on). But the pub_editor.zip  (linked above) is like Notepad and can find and replace text strings in the entire pub with just one click. Using the find and replace choice directly in the NEO Win program requires going through every relevant action script, one by one, which may take a long time.

.

@fkapnist
All my files are in this format. (Russian language)
As I understand it, `pub_editor` requires Python. I don’t have it installed, and I have no desire to install it. For that reason, I’ve shared a version built with VisualNeoWin for those who might be interested.

Vadim, fkapnist and danito have reacted to this post.
Vadimfkapnistdanito
Quote from mishem on October 31, 2026, 7:35 pm

@fkapnist
All my files are in this format. (Russian language)
As I understand it, `pub_editor` requires Python. I don’t have it installed, and I have no desire to install it. For that reason, I’ve shared a version built with VisualNeoWin for those who might be interested.

I updated the zip dowload link. It now includes a Windows file: pub_editor.exe which is standalone and does not require Python to be installed.

https://www.awareware.com/pub_editor.zip

.

luishp has reacted to this post.
luishp