Re: [JDBC] ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()
| От | Barry Lind |
|---|---|
| Тема | Re: [JDBC] ArrayIndexOutOfBoundsException in Encoding.decodeUTF8() |
| Дата | |
| Msg-id | 3E1C9C54.1060903@xythos.com обсуждение исходный текст |
| Ответ на | Re: [JDBC] ArrayIndexOutOfBoundsException in Encoding.decodeUTF8() (Joseph Shraibman <jks@selectacast.net>) |
| Ответы |
Character Encoding WAS: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()
|
| Список | pgsql-general |
Joseph Shraibman wrote: >> >> In postgres UNICODE means utf8. > > > Which differs from java unicode? > Yes. Unicode in java is 16 bit characters (I think the term for this is UCS2), two bytes for each character, whereas utf8 is a variable length encoding with characters represented by 1, 2 or 3 bytes. > I notice there is no way to change a database's encoding. If I just > change the encoding type in the pg_database to latin1 will there be data > loss? The recommended way to do this would be to dump the contents of the database, create a new database with the desired character set and then import the data into that new database. I don't know if changing pg_database directly would work or not. --Barry
В списке pgsql-general по дате отправления: