creating utf-8 random strings

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: creating utf-8 random strings
Date: 2011-12-25 15:16:18
Message-ID: 20111225161618.2efd00f9@anubis.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi list,

In order to make tests I must create strings [20-32] & [32-64]
characters long with accentuated characters.

I use a very old piece of code (not even accurated, but sufficient
until now), however it don't give me lower-case nor accentuated :
for b in range(random.randint(48, 64)):
chiffre = random.randint(65, 88)
myStr += unichr(chiffre)

Does somebody has such code?

JY
--

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Thangalin 2011-12-27 08:11:00 Map table data to XPath expressions
Previous Message Takahiro Noda 2011-12-22 06:11:09 Re: The exact timing at which CHECK constraints are checked