Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIN1250 encoding is handled improperly #22
I filed a bug report several months ago into the old bug tracking system. In order to keep it alive, I create one for the issue here as well.
Data from a PostgreSQL database with WIN1250 encoding should be displayed incorrectly.
Accented characters are displayed as wrong characters.
Steps to reproduce
createdb --encoding=WIN1250 --lc-collate=C --lc-ctype=C --template=template0 heidisql_1250
create table t (c text); insert into t values (chr(193));
In the place where I expect the Hungarian character á to be displayed, I get a questionmark in a diamond.
This happened with the newest version of HeidiSql running on Win7 and PostgreSQL 9.0
Screenshot and previous bug report is available here: https://www.heidisql.com/forum.php?t=23972
Hi Ansgar, I never used postgresql nor mysql from C or Delphi but I think the section 22.3.3. on https://www.postgresql.org/docs/9.2/static/multibyte.html could help. There are some ways mentioned right below Table 22-2 how the client encoding can be changed. I don't know if you can use any but I would start with the
SET CLIENT_ENCODING TO 'value';
I hope it helps. :)
Hi Ansgar, is there any progress in this topic?
This issue (and #58 and #62) make HeidiSQL very hard to use with postgresql. This current one probably casues problems not just in win1250 encoding but all other non-utf8 encodings as well. The other two issues are encoding-independent so they also should be annoying for many users.
If I read the Client/Server Character Set Conversions right, then the client encoding UTF8 should be fine when reading/writing to the server, or am I wrong?
My PG connection btw shows UTF8 when firing
In MySQL/MariaDB the communication can be done mostly in UTF8 while the currently edited table data is in a totally different charset. I guess PG is not very different, at least from what I read in the docs. But I may be wrong here.
Also, in MySQL/MariaDB, there have been many users claiming HeidiSQL to do "something wrong" with the data as critical characters are shown broken, while they are ok in the user's application. In most of these cases the application was broken, storing broken data and reading it in the same broken way, so it looks ok again. Could it be that this is the case here? Sorry, I'm just guessing around, as I have no clue what's exactly broken here.
Hi @ansgarbecker , sorry for replying so slowly, I was on holiday. :)
You are right, if I issue the
This is a good work-around, however, it would be nice to set the client encoding for the given database permanently or setting it automatically because now I have to re-enter this command every time I reconnect to the database. Do you think there is a chance for this?