Skip to content

Ensure utf-8 encoding for anywidget - #253

Merged
almarklein merged 2 commits into
pygfx:mainfrom
Vipitis:encoding
Aug 23, 2026
Merged

Ensure utf-8 encoding for anywidget#253
almarklein merged 2 commits into
pygfx:mainfrom
Vipitis:encoding

Conversation

@Vipitis

@Vipitis Vipitis commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

closes pygfx/renderview#27

I checked this in the browser and in VSCode and it now displays fine on windows (no longer this windows encoding thing, which was in the css as it loaded).
Not sure if the pyodide one is needed, since pyodide platform encoding localte is proper unicode as far as I know, but I kept it in.
Only python 3.15 has utf-8 on all platforms by default - which is years out to become minimum version.

Had to set canvas.set_closable(False) and then canvas.set_closeable(True) for it to update... not sure what that is about.

@almarklein

Copy link
Copy Markdown
Member

Thanks!

This type of issue is why I tend to prefer reading as bytes and then using .decode() (which defaults to utf-8 for a very long time).

@almarklein
almarklein merged commit 0acdc19 into pygfx:main Aug 23, 2026
31 checks passed
@Vipitis
Vipitis deleted the encoding branch August 23, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

odd unicode character for close button in anywidget front end

2 participants