Thread: BUG #4198: The bugreport form has an encoding problem
The following bug has been logged online: Bug reference: 4198 Logged by: Daniel Migowski Email address: dmigowski@ikoffice.de PostgreSQL version: n/a Operating system: Windows XP Description: The bugreport form has an encoding problem Details: Entered Umlauts aren't correctly received by your script responsible for the form at: http://www.postgresql.org/support/submitbug This might be a problem for entering encoding related problems, which i tried to do a few minutes ago. The Input I pasted had in fact nice umlauts displayed, but the response email from you showed them as 2-char-ASCII representation of the UTF-8 char. With best regards, Daniel Migowski
On Mon, May 26, 2008 at 10:01 AM, Daniel Migowski <dmigowski@ikoffice.de> wrote: > > The following bug has been logged online: > > Bug reference: 4198 > Logged by: Daniel Migowski > Email address: dmigowski@ikoffice.de > PostgreSQL version: n/a > Operating system: Windows XP > Description: The bugreport form has an encoding problem > Details: > > Entered Umlauts aren't correctly received by your script responsible for the > form at: > > http://www.postgresql.org/support/submitbug > > This might be a problem for entering encoding related problems, which i > tried to do a few minutes ago. > > The Input I pasted had in fact nice umlauts displayed, but the response > email from you showed them as 2-char-ASCII representation of the UTF-8 char. Looks OK for me, but maybe Gmail is fixing it up. -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
Dave Page wrote: > On Mon, May 26, 2008 at 10:01 AM, Daniel Migowski <dmigowski@ikoffice.de> wrote: > > Entered Umlauts aren't correctly received by your script responsible for the > > form at: > > > > http://www.postgresql.org/support/submitbug > > > > This might be a problem for entering encoding related problems, which i > > tried to do a few minutes ago. > > > > The Input I pasted had in fact nice umlauts displayed, but the response > > email from you showed them as 2-char-ASCII representation of the UTF-8 char. > > Looks OK for me, but maybe Gmail is fixing it up. It does have a problem, because the email sent does not contain a charset header. It does look OK for me too -- as long as I use a UTF8 terminal. The fix is easy, just add this line to the message headers: Content-Type: text/plain; charset=utf-8 -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
Alvaro Herrera <alvherre@commandprompt.com> writes: > It does have a problem, because the email sent does not contain a > charset header. It does look OK for me too -- as long as I use a UTF8 > terminal. The fix is easy, just add this line to the message headers: > Content-Type: text/plain; charset=utf-8 What happens if someone pastes text into the form that is *not* in UTF-8? regards, tom lane
Tom Lane wrote: > Alvaro Herrera <alvherre@commandprompt.com> writes: > > It does have a problem, because the email sent does not contain a > > charset header. It does look OK for me too -- as long as I use a UTF8 > > terminal. The fix is easy, just add this line to the message headers: > > > Content-Type: text/plain; charset=utf-8 > > What happens if someone pastes text into the form that is *not* in UTF-8? AFAIK the browser sends the encoding along the request and a conversion takes place somewhere. (If I'm mistaken, then the thing to do is grab the encoding from the POST request.) -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
"Tom Lane" <tgl@sss.pgh.pa.us> writes: > Alvaro Herrera <alvherre@commandprompt.com> writes: >> It does have a problem, because the email sent does not contain a >> charset header. It does look OK for me too -- as long as I use a UTF8 >> terminal. The fix is easy, just add this line to the message headers: > >> Content-Type: text/plain; charset=utf-8 > > What happens if someone pastes text into the form that is *not* in UTF-8? http form submissions include a content-type header too. I don't remember if PHP (or is it mod_python?) automatically converts incoming strings to the server encoding or if you're expected to do that yourself? Or if it isn't being done for us we could just put that encoding in the email headers. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning