Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding
Date
Msg-id CAKFQuwaKx0M_ved3MDisXhM4uZ98Y=6z1CR8ze3YjVyQn0MNtw@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Postgres, apps, special characters and UTF-8 encoding  (Ken Tanzer <ken.tanzer@gmail.com>)
List 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 by date:

Previous
From: Ken Tanzer
Date:
Subject: [GENERAL] Postgres, apps, special characters and UTF-8 encoding
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Postgres, apps, special characters and UTF-8 encoding