Re: Method to detect certain characters in column?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: ianmmeyer(at)mac(dot)com, PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Method to detect certain characters in column?
Date: 2008-06-24 05:36:17
Message-ID: 486087D1.1040101@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ian Meyer wrote:
> That's entirely possible.. which is the reason for cleanup.. we're
> moving to a model where members can be queried by name, and UTF-8
> isn't allowed in URLs, so we need to rename/remove users with those
> types of names.

Depending on your webserver, Unicode characters should be possible in
URLs. Certainly some non-7-bit characters can be represented in URLs
with % encoding.

On my Apache system, for example, the string:

áüÜć

in latin-1 encoding is represented in a URL as:

%c3%a1%c3%bc%c3%9c%c4%87

If that same byte sequence is decoded as UTF-8 instead, it is:

áüÜć

(a-acute u-umlaut U-umlaut c-acute)

In other words, you can send an arbitrary byte sequence in a URL with %
escapes. How that byte sequence is decoded into a sequence of characters
depends on your web server and its configuration - or, if the web server
sends the % encoded URL directly to your client, on how your client
chooses to interpret it.

The main trouble will be ensuring that clients and the server agree on
the character encoding used in the URL.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Moisey 2008-06-24 06:41:18 replication
Previous Message Adam Rich 2008-06-24 04:54:19 Re: what are rules for?