On 27.01.2016 14:14, Stas Kelvich wrote:
Hi.

I tried that and confirm strange behaviour. It seems that problem with small 
cyrillic letter ‘х’. (simplest obscene language filter? =)

That can be reproduced with simpler test

Stas



The test program was corrected. Now it uses wchar_t type. And it works correctly and gives right output.

I think the NIImportOOAffixes() in spell.c should be corrected to avoid this bug.

--
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
#include <stdio.h>
#include <locale.h>
#include <wchar.h>

char *src = "SFX Y   хаться шутся        хаться";

int
main(int argc, char *argv[])
{
	wchar_t c1[1024], c2[1024], c3[1024], c4[1024], c5[1024];

	setlocale(LC_CTYPE, "ru_RU.UTF-8");

	sscanf(src, "%6ls %204ls %204ls %204ls %204ls", c1, c2, c3, c4, c5);

	printf("%ls/%ls/%ls/%ls/%ls\n", c1, c2, c3, c4, c5);

	return 0;
}
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to