Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding
Дата
Msg-id CAKFQuwaKx0M_ved3MDisXhM4uZ98Y=6z1CR8ze3YjVyQn0MNtw@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Postgres, apps, special characters and UTF-8 encoding  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
On Tue, Mar 7, 2017 at 4:20 PM, Ken Tanzer <ken.tanzer@gmail.com> wrote:
As I understand it, those are likely encoded in something non-UTF-8, like WIN-1251 or something.  And that one way or another, the encoding needs to be translated before it can be placed into the database.  I'm not clear how this is supposed to happen though.  Automatically by the browser?  Done in the app?  Some other way?  And if in the app, how is one supposed to know what the incoming encoding is?

​Haven't run into this problem personally, probably accidentally lucky, but ISTM that you need to tell the browser what character set you are working in.  It is in the best position to mediate between the user and the server.

Ideally, on the server, you can examine HTTP headers to learn about the incoming data charset/encoding (I may not be using these terms precisely but you should get the idea).

Googling "html input field encoding" seems to provide a decent start.

Note that technically the data encoding issues can occur without HTML, its really an HTTP layer thing, but the medium of use you care about is HTTP/Browsers.

David J.

В списке pgsql-general по дате отправления:

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: [GENERAL] Postgres, apps, special characters and UTF-8 encoding
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding