AtlasOfLivingAustralia / data-quality-filter-service

0 stars 2 forks source link

Wrong encoding when editing profiles titles #3

Closed vjrj closed 2 months ago

vjrj commented 2 years ago

Editing utf-8 titles:

image

cause wrong charsets:

image

The database created by ala-install is UTF-8 and also, if the profile is imported, does not have encoding issues. So it sounds like is specific to this form.

I tried to setup the datasource url with useUnicode=true&characterEncoding=UTF-8 but didn't solve it.

adam-collins commented 5 months ago

An example string please.

I did find an example that reproduced the error, but I lost it and cannot find another that fails.

adam-collins commented 3 months ago

Feel free to reopen with an example.

vjrj commented 3 months ago

With áéíóú or äëïöü for instance in the Description using 1.4.0, that is any non-latin character.

image

image

In the DB:

data-quality=# select * from public.quality_profile;
 id | version | display_order | short_name |      date_created       | contact_name  |      last_updated       |  name   | is_default | contact_email | enabled |   description   
----+---------+---------------+------------+-------------------------+---------------+-------------------------+---------+------------+---------------+---------+-----------------
  1 |       1 |             1 | default    | 2024-03-29 10:35:54.787 | Support Email | 2024-03-29 11:21:28.558 | Default | t          |               | t       | �����
(1 row)
data-quality=# SHOW SERVER_ENCODING;
 server_encoding 
-----------------
 SQL_ASCII
(1 row)

Compared with the spatial layersdb:

layersdb=# SHOW SERVER_ENCODING;
 server_encoding 
-----------------
 UTF8
(1 row)
adam-collins commented 2 months ago

I cannot reproduce.

A fresh install of data-quality-filter-service using ala-install creates a database with server encoding UTF-8. Not sure how you get SQL_ASCII.

Is it a problem only on older installations?

adam-collins commented 2 months ago

Given that it is a database creation issue (wrong server encoding), I'll close this.