psql Client encoding doesn't allow Umlaute / other UTF8 special characters

未关闭
#76 6 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@ProchaLu 已经在做这个了。

开始于 2024年6月15日。

评估

这个 Issue 还没有评估数据。

描述

Reporting on behalf of @Petzlc, text from @Petzlc:

What happened that was unexpected

Hyper somehow cannot process äöü so it always throws this Error message:

FEHLER:  Zeichen mit Byte-Folge 0x81 in Kodierung »WIN1252« hat keine Entsprechung in Kodierung »UTF8«

What were your expectations

That i can create my table with the values that contain äöü in the spelling.

Your guess of what the problem is

So on my journey of researching i ran into this message that also appears when i start psql and which seems to be a problem for other people too and seems to be the root of this problem:

WARNING: Console code page (850) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

(mine is in german though)

with the following advice:

You should know what encoding is used in your database.

SHOW server_encoding;

When you connect to your database you can specify what encoding should your client use:

SET client_encoding TO 'UTF8';

If server and client encoding differ, the database driver tries to translate between those two encoding. When it can not find an equivalent character, the error is thrown.

A list of things you have tried to solve it

So this seems to me like a pretty forward advice of what to do when someone runs into this error. I didn't try to apply it though and just changed the äöü to ae and oe and ue. Also i'm wondering if this affects é è and so on. I just changed everything to uncomplicated and common letters.

主要语言
没有语言数据
星标
30
派生
18
平均合并
22 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

upleveled/system-setup 的其他 Issue

查看 upleveled/system-setup 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。