Character miscount - Mailing list pgadmin-hackers

From Erwin Brandstetter
Subject Character miscount
Date
Msg-id 463B92FE.6090303@falter.at
Whole thread Raw
Responses Re: Character miscount
List 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

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r6262 - in trunk/pgadmin3/pgadmin: debugger include/debugger
Next
From: Guillaume Lelarge
Date:
Subject: Re: Issue with spanish and serbian translations