Page 1 of 1

invalid byte sequence for encoding \"UTF8\": 0xf9"

Posted: Mon 12 Sep 2016 16:57
by Simone Torri
Hello,
i'm using dotConnect for PostgreeSQL but when i use this ling query:

var id = (from x in pmr.findAllGroups()
where x.Name.Trim().Equals('Pùblico')
select x.Id).SingleOrDefault();

in PostgreeSQL linq render this query:

SELECT "Extent1"."ID"
FROM public."GRUPOS" AS "Extent1"
WHERE ((Trim("Extent1"."NOMBRE")) = (Trim('Público'))) OR (Trim("Extent1"."NOMBRE") IS NULL AND (Trim('Público') IS NULL))
[public."GRUPOS" varchar(100), public."ID" INTEGER]

and, curious, work without problems in postgreeSQL directly... and offcurse i dont see any error in both if i don't filter for 'Público' but i only filter for Publico' (without using UTF8 coding [ù])

Thanckyou for any help!

Re: invalid byte sequence for encoding \"UTF8\": 0xf9"

Posted: Tue 13 Sep 2016 08:39
by Shalex
Please add "Unicode=true;" to your connection string and try again.

Re: invalid byte sequence for encoding \"UTF8\": 0xf9"

Posted: Tue 13 Sep 2016 13:51
by Simone Torri
Thanck's!