答复: [JDBC] invalid byte sequence for encoding "UTF8": 0x00 - Mailing list pgsql-admin

From liuyuanyuan
Subject 答复: [JDBC] invalid byte sequence for encoding "UTF8": 0x00
Date
Msg-id 006001cfc589$1102c7a0$330856e0$@gmail.com
Whole thread Raw
List pgsql-admin
Hi, Laurenz Albe!
Thanks for all your help! I've understand. Thank you so much!

Best Regards!
Jasmine


-----邮件原件-----
发件人: Albe Laurenz [mailto:laurenz.albe@wien.gv.at]
发送时间: 2014年8月29日 17:58
收件人: liuyuanyuan *EXTERN*
主题: RE: [JDBC] invalid byte sequence for encoding "UTF8": 0x00

> Are there other error encoded Strings that I haven't catch?
> If there other error encoded String occurs, maybe my program will catch exception again.
> Is there a foolproof method that could resolve all problem caused by encoding ?

To the best of my knowledge, all you need to check is if the data is valid
UTF-8 and does not contain a \u0000 character.
Then PostgreSQL should not have a problem with it (the server encoding is UTF8, otherwise it may be that the server
cannotstore a valid character). 

Yours,
Laurenz Albe




pgsql-admin by date:

Previous
From: lalit jangra
Date:
Subject: Getting invalid page header in block while vacuuming PostgreSQL DB.
Next
From: Sanket Mehta
Date:
Subject: Re: OF TYPE without SCHEMA specified in TABLE creation interface