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

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

Postby Simone Torri » Mon 12 Sep 2016 16:57

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!
Simone Torri
 
Posts: 11
Joined: Wed 07 Sep 2016 11:23

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

Postby Shalex » Tue 13 Sep 2016 08:39

Please add "Unicode=true;" to your connection string and try again.
Shalex
Devart Team
 
Posts: 7774
Joined: Thu 14 Aug 2008 12:44

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

Postby Simone Torri » Tue 13 Sep 2016 13:51

Thanck's!
Simone Torri
 
Posts: 11
Joined: Wed 07 Sep 2016 11:23


Return to dotConnect for PostgreSQL