From: gautier_niouzes@hotmail.com
Subject: Re: A few questions on parsing, sockets, UTF-8 strings
Date: Thu, 11 Aug 2016 12:09:34 -0700 (PDT)
Date: 2016-08-11T12:09:34-07:00 [thread overview]
Message-ID: <9c4fe26a-484c-40f8-829e-e2c886daf507@googlegroups.com> (raw)
In-Reply-To: <4c6509a9-5ff2-4f94-b2c3-55d89ca2b076@googlegroups.com>
> In that case, as long as I don't need to access single characters ever, could I stick with fixed strings?
Exactly. String is just an array of (8-bit) Character, so you can have UTF-8 strings stored there (or ASCII, or other things...), but a single "Unicode character" will take one *or more* Character's in a String.
As a reminder, you can define "subtype UTF_8_String is String;", just to be aware that taking a single Character's in your String can be meaningless.
But wait, the package Ada.Strings.UTF_Encoding does it for you, plus provides conversions functions.
_________________________
Gautier's Ada programming
http://sf.net/users/gdemont/
next prev parent reply other threads:[~2016-08-11 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 14:39 A few questions on parsing, sockets, UTF-8 strings john
2016-08-11 16:23 ` Dmitry A. Kazakov
2016-08-11 17:40 ` john
2016-08-11 17:49 ` Dmitry A. Kazakov
2016-08-11 18:22 ` john
2016-08-11 19:09 ` gautier_niouzes [this message]
2016-08-11 21:10 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox