phetsims / joist

Joist is the main framework for PhET Interactive Simulations. Joist creates and displays the simulation content, home screen, navigation bar, About dialog, enables switching between tabs, and other framework-related features.
MIT License
8 stars 6 forks source link

Unable to open screenshots if sim title has diacritics #921

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.3.1

Browser Chrome 112

Problem description First seen when testing https://github.com/phetsims/qa/issues/930, but is a general issue:

If I take a screenshot using the tool in the PhET Menu when a sim title contains a diacritic, I am unable to open the screenshot.

This only occurs with mac + chrome. @KatieWoe and @stemilymill also confirmed on their devices.

Steps to reproduce Here is an example:

  1. In the density sim, switch the locale to Italian. The title now has an accent mark.

  2. Take a screenshot from the PhET menu.

  3. Try to open the screenshot at the bottom of your screen--it doesn't open

    Screenshot 2023-04-27 at 12 07 44 PM
  4. Go to your Downloads folder and try to open the screenshot --it doesn't open.

  5. Open Preview and then open the file --this works.


@stemilymill also reported:

and the weird thing is that if i screenshot it in english and then change the file name to be the same as the not-working italian one, it still works fine

zepumph commented 1 year ago

@jonathanolson have we run into this before? I thought perhaps but I couldn't find a paper trail.

zepumph commented 1 year ago

Is it too horrible to just always use the english name?

https://github.com/phetsims/joist/blob/3a5a03c897454918278899cf36070bb095ce211c/js/PhetMenu.ts#L170

I don't know who can help me make this call. @samreid can you help me with a brainstorm?

samreid commented 1 year ago

My first instinct was to use the project name (like the name of the github repo), but I'd like to understand the problem more. When I download italian density screenshot on my macbook air M1 with Chrome, it opens correctly with Preview. Also when I go to the downloads folder and double click on it, it also opens with preview. I'm running MacOS Ventura 13.4.

Nancy-Salpepi commented 1 year ago

For @Nancy-Salpepi @KatieWoe @stemilymill what application normally opens a *.png file (without a diacritic)?

Preview opens the file

@samreid

zepumph commented 1 year ago

Thanks for the report! With that in mind, I'm going to close this issue. Please reopen if you encounter it again in the future.