Problem with RichEdit on PSQL 8.4

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
Shagrat3
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 28.07.2009, 16:02
Contact:

Problem with RichEdit on PSQL 8.4

Post by Shagrat3 »

Problem with RichEdit on PSQL 8.4

When .POST I see EXCEPTION
Project clients.exe raised exception class EZDatabaseError with message 'SQL Error: ERROR: invalid byte sequence for encoding "UTF8": 0x00
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".'. Process stopped. Use Step or Run to continue.
SQLMonitor:
2009-08-03 14:04:00 cat: Execute, proto: postgresql-8, msg: UPDATE public.clients SET note='{\134rtf1\134ansi\134deff0{\134fonttbl{\134f0\134fnil\134fcharset204 MS Sans Serif;}}
\134viewkind4\134uc1\134pard\134lang1049\134f0\134fs16\134{rtf1ansiansicpg1251deff0\134{fonttbl\134{f0fswissfcharset204\134{*fname Arial;\134}Arial CYR;\134}\134{f1fswissfcharset0 Arial;\134}\134{f2fnil MS Sans Serif;\134}\134}\134par
viewkind4uc1pardlang1049f0fs16\047c1\047e5\047f1\047ef\047eb\047e0\047f2\047ed\047eelang1033f1 lang1049f2par\134par
\134}\134par
\134par
}
\000' WHERE id=5, errcode: 0, error: ERROR: invalid byte sequence for encoding "UTF8": 0x00
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
This error appeared after installing 8.4, on 8.3 is worked.

Table:
CREATE TABLE clients
(
id serial NOT NULL,
make timestamp without time zone,
sale timestamp without time zone,
note text,
firstname character(64),
lastname character(64),
sername character(64),
phone character(48),
"Address" character(255),
diler character(64),
sn integer,
unin character(16) NOT NULL,
mac macaddr,
CONSTRAINT clients_sid PRIMARY KEY (id)
)
Delhi 7
ZEOS 6.6.5-stable
PSQL 8.4

How do I fix this error?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

I'm not a PSQL expert. Has something changed in the (default?) encoding used between server and client in PSQL8.4 ? Like now the server expects utf8 instead of the encoding used before.
Or by installing the new version you may have changed some setting?

Not sure, but it looks like the bytea encoding is used here for sending data to the server. Is that (still?) allowed for text fields?

Mark
Image
Shagrat3
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 28.07.2009, 16:02
Contact:

Post by Shagrat3 »

Thank you. The RTF format mast to use bytea. Just Postgers 8.3 and below are not cursing the character \ 000 stands at the end of the stream
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Did you solve the problem now by changing the datatype of the field to bytea?

Mark
Image
Shagrat3
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 28.07.2009, 16:02
Contact:

Re: Problem with RichEdit on PSQL 8.4

Post by Shagrat3 »

Work OK
Post Reply