DB Object - Save As adds 3 bytes to begining of file

KenW

Member
PSD Version 9.0.4.1644
When I edit a database object then do a "Save As", the saved file always has these 3 bytes at the beginning of the file: ef bb bf.
Is there any way to prevent this??
I have to edit every file before I can load into our version control system and this just adds additional work.

Thanks for any help you can provide on this issue.
PC OS is Windows 7 SP1.
 
This is perhaps BOM to sign file content as unicode.
Don't know what triggers PLSD to do that. Maybe unicode charcters in database object scripts?!
Anyway, what vcs / editor are You using? VCS shoouldn't care about that and "modern" editor same.
 
This is indeed the BOM marker for Unicode. This will happen if your source contains Unicode characters that are not included in your Windows character set. These characters would obviously be converted incorrectly.

 
Marco, is there any way to disable the BOM? The BOM can be a big problem for SQL*Plus scripts when executed in Linux.
 
Today I noticed that I get the same characters at beginning of "Export Query Results" to csv.
Is there something in Preferences that would do this?

I had to reinstall PSD when our support group upgraded my pc from XP to Windows 7 and I did not have a copy of the preferences file saved from XP so I had to recreate my Preferences from what I could remember (I'm sure I missed some).
I never had this issue running the same version of PSD on XP, only after changing to Windows 7.

Since it seems that all "saving" is putting in these characters I am beginning to believe that there may be some setting in the Preferences that I have different than when I was on XP.

Guidance on where to look would be appreciated.
Thanks!!

I found 2 places in Preferences that seem to have cleared up the issue:
Oracle - Options - "Unicode enables"; was checked, I unchecked.
Files - Format - "Encoding"; was "Always use UTF8", changed to "Autodetect".

Restarted PSD, Exported query result and view package body and Saved As - neither saved files had the 3 characters at the begining.

Regards.
 
Last edited:
I believe the autodetect only saves a file as UTF8 when there are characters outside US ASCII (or windows default) character set.

As long as you only use US characters files will not be saved as UTF8.

In other countries this is a bigger problem as they often use accented or other special characters which needs UTF8.
 
Back
Top