TOAD saves source code in ANSI always

TOAD always saves the source code in ANSI encoding despite the choice of UTF-8. TOAD beta 15.0.23.720

Saves it from where? There are multiple ways to save code from Toad.

Please give specific steps.

Thanks.

git checkout master
Open procedure or package (in UTF-8), edit and save. And it saved in ANSI! If use Save as then it saved in UTF-8.

I tried to reproduce this but for me it is working. Toad saves the file with whatever the file's original encoding was.

Can you try this as a test?
After git checkout master, open the file with Notepad.
Then in Notepad, do a "Save As". You don't actually have to save it, but look and see what the selected encoding is.

Open in TOAD:

After save in TOAD (Notepad Save as):

Based on your images above, and your description, it looks like you're opening the file in Notepad after you've saved it from Toad. What does the file look like in Notepad when updated directly from Git, and without opening it in Toad?

Also, what version is your Git command-line client? If you're still using an older version of the Git client (1.7.9 or below), your client may not support UTF-8 encoding. I believe they added support for UTF-8 around the 1.7.9 - 1.7.10 versions.

-John

The matter is that TOAD saves to ANSI after editing, despite the fact that UTF-8 encoding is set. PL/SQL Developer saves to UTF-8 if UTF-8 encoding is set. Git has nothing to do with this.

I made a video to show exactly what I am doing. If you are doing something different, please let me know.

Opened in UTF-8 and saved in ANSI
Choose 1080 for quality

1 Like

Oh! My video was backwards - I should have made my original file in UTF8! I tried that and it still worked ok.

But, I can reproduce the problem after watching your video. It breaks when the package is split into different tabs. You can work around it by not splitting. We'll get it fixed soon.

Hi John
Is that bug fixed? In what version? I encounter this problem also in Release 14.0.75.
Thanks. Thom

Yes, we fixed that one.

By the way, I don't recommend version 14.0 for anyone. It had some nasty problems with freezes. You should update to 15.0. The only catch on that is if you have an Oracle client version 12.1.0.1, you'll need update it to 12.1.0.2 or 12.2.0.1 or 18c. I don't recommend 19c or 21c clients because they have memory leaks with LOB data types.

Thx, John.

The downloadable version is posted Oct. 18, 2021. This thread begins Nov 2021.
Is it really fixed in official release?

Rgds, Thom

The thread began in November 2020. I'm looking to make sure this was fixed. I think it was but I'll test and get back to you. You should upgrade to 15.0 to get off of 14.0 regardless. :smiley:

The video that rtx posted is gone so I can't be sure, but I opened/saved a package, split and it saved as unicode. If you post some specific steps to reproduce the original problem I'll try again. I had trouble reproducing it when it was first reported so I may be missing something again now.

Ah, I found it in our internal bug tracking system. Fixed on Nov 30, 2020.

These were the steps

Setup:

  1. Save a package spec and body to the same file, with UTF* encoding.
  2. Set Toad's options to split or prompt to split files.

Steps to reproduce problem:

  1. Open the package file from the setup. Split if prompted.
  2. Make some small change in the editor.
  3. Click "Save" (not Save As)
  4. Bug: The file's encoding has been changed to ANSI.