pgAdmin 4 including  in all copied strings I'm having trouble using copy/paste from pgAdmin 4. The symptom is that I get the character &lt;U+FEFF&gt; aka Zero Width No-break Space aka Byte Order Mark (BOM) prepended to any string I copy.

The workaround is to paste and then delete that first character. But in practice this is cumbersome. In some contexts the character does not get pasted (in vim on my machine). In some contexts it is pasted, but it's not visible. In other cases it is "visible" as a space (in TextWrangler on my machine).

Here's a bit more detail. I successfully type and execute a query:

select 'this is constant text value in my query'


I select and copy these 4 characters: text

I think my clipboard should contain just those 4 characters. But it doesn't. Instead, it contains this: &lt;U+FEFF&gt;text

This is perhaps related to this old thread between Josh Berkus and Dave Page. But that discussion focuses on the fact that pgAdmin puts the character at the beginning of any file. In my case it's really not the file that is the issue. It's the clipboard.

More practically, the solution in that case was to go to File -> Options and turn off Unicode file writing. In pgAdmin 4 (v2.1 on MacOS), that menu doesn't exist. The menu File -> Preference exists, but I can find no corresponding setting in the Preferences.

Question: can anyone help me to prevent the FEFF character from sneaking into the clipboard whenever I copy anything in pgAdmin?
It turns out this is a known bug:

https://redmine.postgresql.org/issues/2980

It has been fixed in source already. Expect the fix in pgAdmin 4 v3. Khushboo said in the pgadmin-support list that it will be out soon.