Need magic that checks if a collumn contains values that CAN NOT be converted to Latin1
В списке pgsql-general по дате отправления:
| От | Andreas |
|---|---|
| Тема | Need magic that checks if a collumn contains values that CAN NOT be converted to Latin1 |
| Дата | |
| Msg-id | 4BD8F6E2.7050905@gmx.net обсуждение исходный текст |
| Ответы |
Re: Need magic that checks if a collumn contains values
that CAN NOT be converted to Latin1
Re: Need magic that checks if a collumn contains values that CAN NOT be converted to Latin1 |
| Список | pgsql-general |
Hi, I've got an 8.4.3 Unicode DB that accidentally holds a few records with characters that can't be converted to Latin1 or 9 for output to CSV. I'd just need a way to check if a collumn contains values that CAN NOT be converted from Utf8 to Latin1 to select all those affected records. I tried: Select convert_to (my_column::text, 'LATIN1') from my_table; It raises an error that says translated: ERROR: character 0xe28093 in encoding »UTF8« has no equivalent in »LATIN1« Regrettably it doesn't explain where it found this sign. Select '\xe28093' complains that this weren't a valid UTF8 code at all. So how was it accepted and stored in the first place? When I know which record has faulty content I can correct it. regards Andreas :)
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера