Example SQL:
select
length(printf ('%4s', 'abc')),
length(printf ('%4s', 'äöü')),
length(printf ('%-4s', 'abc')),
length(printf ('%-4s', 'äöü'))
Output is 4, 3, 4, 3. Padding seems to take into account UTF-8 bytes
instead of UTF-8 code points.
Should padding not work on code points
On 2/17/18, Ralf Junker wrote:
> Example SQL:
>
> select
>length(printf ('%4s', 'abc')),
>length(printf ('%4s', 'äöü')),
>length(printf ('%-4s', 'abc')),
>length(printf ('%-4s', 'äöü'))
>
> Output is 4, 3, 4, 3. Padding seems to take into account UTF-8 bytes
>
On Sat, Feb 17, 2018 at 3:36 PM, Richard Hipp wrote:
> On 2/17/18, Ralf Junker wrote:
> > Example SQL:
> >
> > select
> >length(printf ('%4s', 'abc')),
> >length(printf ('%4s', 'äöü')),
> >length(printf ('%-4s', 'abc')),
> >length(printf
Richard Hipp wrote:
> On 2/17/18, Ralf Junker wrote:
>> Example SQL:
>>
>> select
>>length(printf ('%4s', 'abc')),
>>length(printf ('%4s', 'äöü')),
>>length(printf ('%-4s', 'abc')),
>>length(printf ('%-4s', 'äöü'))
>>
>> Output is 4, 3, 4, 3.
On 2018-02-17, at 17:36, Richard Hipp wrote:
> The current behavior of the printf() function in SQLite, goofy though
> it may be, exactly mirrors the behavior of the printf() C function in
> the standard library in this regard.
>
> So I'm not sure whether or not this is
Hello,
On 2018-02-18 01:46, Peter Da Silva wrote:
Printf's handling of unicode is inconsistent in other ways, too. I suspect that
there's still undefined behavior floating around in there too. Even wprintf
isn't entirely unsurprising:
You have supplied examples which are exchanged with each
6 matches
Mail list logo