From: Ali Bendriss <ali.bendriss@gmail.com>
Subject: string and wide string usage
Date: Thu, 7 Mar 2013 11:12:01 +0000 (UTC)
Date: 2013-03-07T11:12:01+00:00 [thread overview]
Message-ID: <kh9sm1$tj4$1@dont-email.me> (raw)
Hello,
I've got a small program that read some value from an ldap server and
copy them in a posgres database.
the function reading the ldap value return an unbounded_string, then I
use to_string to feed postgres (using gnatcoll).
I've got some problem with some string in example:
a base 64 encoded string
V2luZG93c8KgNyBQcm9mZXNzaW9ubmVsIE4=
wich decode to 'Windows\xa07 Professionnel N' in utf-8
every thing is working if I feed directly the database, but if want to
apply Ada.Characters.Handling.To_Lower on the string before feeding the
database postgres is not happy
'ERROR: invalid byte sequence for encoding "UTF8": 0xe2 0xa0 0x37'
it's not really a big deal, but I would like to understand where the
problem is. Do I have to use wide string ?
thanks,
Ali
next reply other threads:[~2013-03-07 11:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-07 11:12 Ali Bendriss [this message]
2013-03-07 14:20 ` string and wide string usage ytomino
2013-03-07 17:14 ` Dmitry A. Kazakov
2013-03-07 23:53 ` Randy Brukardt
2013-03-08 2:05 ` Yannick Duchêne (Hibou57)
2013-03-08 3:07 ` Randy Brukardt
2013-03-07 17:48 ` Vadim Godunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox