title: Postgresql and unicode table names: Why can I not select the table name from the information schema when it contains unicode characters?
body: <p>I created a table with a unicode character in the name (to specifically test table names with unicode).  It created the table fine, but my method for detecting if the table exists broke!</p>
  
  <p>Here is the interaction in question:</p>
  
  <pre><code>caribou_test=# select table_name from information_schema.tables where table_schema = 'public';
   table_name  
  -------------
  ...
   pinkpink1
  (16 rows)
  
  caribou_test=# select table_name from information_schema.tables where table_schema = 'public' and table_name = 'pinkƒpink1';
   table_name 
  ------------
  (0 rows)
  
  caribou_test=# select table_name from information_schema.tables where table_schema = 'public' and table_name = 'pinkpink1';
   table_name 
  ------------
  (0 rows)
  
  caribou_test=# select * from pinkƒpink1;
   id | position | env_id | locked |         created_at         |       updated_at        | status_id | status_position | i1l0  |  f∆   |  growth555   
  ----+----------+--------+--------+----------------------------+-------------------------+-----------+-----------------+-------+-------+--------------
    1 |        0 |      1 | f      | 2013-06-27 14:50:34.228136 | 2013-06-27 14:50:34.227 |         1 |               0 | YELLL | 55555 | 1.3333388822
  (1 row)
  </code></pre>
  
  <p>The table name is pinkƒpink1 (test data).  As you can see, when I select the table names from information_schema.tables it displays without the ƒ, but I can't select the table name either way!  But I can still issue selects to that table directly.  What is going on here?</p>
  
  <p>EDIT:  providing requested information for @craig-ringer:</p>
  
  <pre><code>caribou_test=# SELECT current_setting('server_encoding') AS server_encoding, current_setting('client_encoding') AS client_encoding, version();
   server_encoding | client_encoding |                                                                    version                                                                     
  -----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------
   UTF8            | UTF8            | PostgreSQL 9.2.2 on x86_64-apple-darwin12.2.1, compiled by Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn), 64-bit
  
  caribou_test=# SELECT * FROM pg_class WHERE relname = 'pinkƑpink1';
  ---&gt;  (0 rows)
  
  caribou_test=# SELECT upper('ƒ') = 'Ƒ', lower('Ƒ') = 'ƒ';
   ?column? | ?column? 
  ----------+----------
   t        | t
  (1 row)
  
  caribou_test=# WITH chars(rowid, thechar) AS (VALUES (1,'ƒ'),(2,'Ƒ'),(3,upper('ƒ')),(4,lower('Ƒ'))) SELECT rowid, thechar, convert_to(thechar, 'utf-8') from chars;
   rowid | thechar | convert_to 
  -------+---------+------------
       1 | ƒ       | \xc692
       2 | Ƒ       | \xc691
       3 | Ƒ       | \xc691
       4 | ƒ       | \xc692
  </code></pre>