Quick SQLDeveloper Hint — Dial0gInput

The other day I was attempting to debug a SQL statement which was doing a REGEXP_REPLACE and the comments said something like “remove all zero’s from the string”.

However, in looking at the code, it looked like it was removing all capital O’s from the string instead of 0′s — see even here within WordPress I can’t tell the difference between an O (the letter) and a 0 (the number).

At first I thought it a coding mistake until I tried to type both of them into a window within SQL Developer — nope, they looked the same. Must be a font issue.

Fonts can be changed in SQL Developer under the Preferences / Code Editor / Fonts selection — you may want to limit choices to fixed-width fonts by checking “Display Only Fixed-Width Fonts”. The default on my system was DialogInput — which appears to have the O/0 problem. I ended up choosing Consolas 12pt and exiting back out to the editor.

Only to see a horribly grainy looking font.  Yuck!

Back to the Preferences — somewhat hidden under Preferences / Code Editor / Display is an item for “Enable Text Anti-Aliasing” — check it.

Much, much better.

I think that preference item should be moved to the Fonts category, but at least I was able to find it — and my eyes feel a lot better.

Oh yeah, now I can tell zeros from o’s again — now on to those pesky 1′s and l’s … :-)

UPDATE

You may also want to adjust the font used for Printing to match your Editor selection — to do so, navigate to Preferences / Code Editor / Printing as well as Printing HTML to change the fonts to match your Editor selection.

2 Responses to “Quick SQLDeveloper Hint — Dial0gInput”

  1. Log Buffer #264, A Carnival of the Vanities for DBAs | The Pythian Blog Says:

    [...] Dominic Delmolino blogs about SQLDeveloper Hint — Dial0gInput. [...]

  2. Log Buffer #264, A Carnival of the Vanities for DBAs Says:

    [...] Dominic Delmolino blogs about SQLDeveloper Hint — Dial0gInput. [...]

Leave a Reply

Posting code can be a pain. To make sure your code doesn't get eaten, you may want to pre-format it first by using HTML Encoder