Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import and export color palette is not UTF-8 encoded #60740

Open
2 tasks done
phidrho opened this issue Feb 25, 2025 · 0 comments · May be fixed by #60741
Open
2 tasks done

Import and export color palette is not UTF-8 encoded #60740

phidrho opened this issue Feb 25, 2025 · 0 comments · May be fixed by #60741
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@phidrho
Copy link
Contributor

phidrho commented Feb 25, 2025

What is the bug or the crash?

Hi,

we have an option to import and export Color Palettes from QGIS.
Sharing of color palettes is also supported by new HUB website.
But currently, on desktop side if we export color palette on Windows, exported file will be encoded in local encoding, instead of UTF-8.

QGIS uses GPL file format for storing information on color palettes. By GIMP color palette specification, all GPL files should be UTF-8 encoded.

We should force UTF-8 encoding on reading and writing GPL files to ensure interoperability between operating systems and make sharing styles and color palette files easier via new HUB website.

Import into QGIS from UTF-8 encoded GPL file:
Import

Export from QGIS into file (ends up in local encoding - Windows 1250)
Export

Steps to reproduce the issue

  • Create new color palette and name color with specific local letters that are not covered by ASCII table.
  • Export Colors to GPL file
  • Open exported file with UTF-8 encoding

Versions

QGIS version3.42.0-Münster
QGIS code revisionfeb8023300
 
Libraries
Qt version5.15.13
Python version3.12.9
GDAL version3.10.2
PROJ version9.5.1
EPSG Registry database versionv11.022 (2024-11-05)
GEOS version3.13.0-CAPI-1.19.0
SQLite version3.46.1
PDAL version2.8.3
PostgreSQL client version17.3
SpatiaLite version5.1.0
QWT version6.3.0
QScintilla2 version2.14.1
OS versionWindows 10 Version 2009
 
Active Python plugins
qfieldsyncv4.12.2
db_manager0.1.20
MetaSearch0.3.6
processing2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@phidrho phidrho added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant