Skip site navigation (1) Skip section navigation (2)

Character miscount

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: Character miscount
Date: 2007-05-04 20:09:34
Message-ID: 463B92FE.6090303@falter.at (view raw or flat)
Thread:
Lists: pgadmin-hackers
Hi developers! Hi Dave!

Testing pgAdmin III v1.6.3 rev: 6112, client Win XP, host: Debian Sarge, 
PG 8.1.9.

A pretty useful feature in the SQL query dialogue displays data about 
the current position of the cursor.

        Ln 168 Col 30 Ch 7596

"Ch" supposably stands for "Characters".
However, it is not the correct character count, but (supposably) the 
byte-length of the string. Multibyte-characters (like German umlauts ö ä 
ü) mess with the count. I stumbled across this while trying hard to fix 
a functions that wouldn't return the right length of a string. Turns 
out, the function was right, pgAdmin was wrong.

I have reported appearances of this phenomenon in various places (and 
Dave has fixed them) in the past. Maybe you can identify a typical 
function or word to look for in all of the source code to find other 
instances of the beast? (Just a thought.)


Regards
Erwin

Responses

pgadmin-hackers by date

Next:From: svnDate: 2007-05-04 20:23:45
Subject: SVN Commit by dpage: r6262 - in trunk/pgadmin3/pgadmin: debugger include/debugger
Previous:From: svnDate: 2007-05-04 15:40:21
Subject: SVN Commit by dpage: r6261 - in trunk/pgadmin3/pgadmin: . ctl debugger include include/ctl include/debugger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group