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

Add lacking file with UTF-8 name encoding #1018

Closed
wants to merge 1 commit into from

Conversation

rlaboiss
Copy link
Member

In a Debian GNU/Linux system, the unit test unicode.praat fails with Praat 6.0.56:

$ ./praat --run test/kar/unicode.praat 
Unicode
Error: Script assertion fails in line 43 (false):
   fileReadable (decomposed$ + ".wav")   ; this works even on Windows!
Script “/var/data/rlaboiss/debian/PKGS/praat/praat/test/kar/unicode.praat” not completed.
Praat: script command <<test/kar/unicode.praat>> not completed.

This is caused by the fact that the file with name decomposed$ + ".wav" is absent. This is a trick problem, because this file has a name that is visually identical to the file precomposed$ + ".wav":

precomposed$ = "éééürtüéŋəü"   ; typed into ScriptEditor
decomposed$  = "éééürtüéŋəü"   ; copied from MacOS file icon

The accented characters in these strings are encoded differently. In the precomposed$ one, the "é" glyph, for instance, is a pure Unicode character (LATIN SMALL LETTER E WITH ACUTE U+00E9), while in the decomposed$ one, the "é" glyph is composed of two Unicode character (LATIN SMALL LETTER E U+0065 + COMBINING ACUTE ACCENT U+0301).

The problem comes from the fact that only the WAV file with the precomposed$ name is present. This commit adds a copy of that file with a name encoding that corresponds to the decomposed$ name.

@PaulBoersma
Copy link
Member

indeed: on some filesystems used under Linux, both files can exist at the same time, so I now commented these two lines out on Linux by using "if not linux". On the Mac and on Windows, these two lines continue to exist. Their point is that even though there is only one file, both macOS and Windows (at least their usual filesystems) should be able to find it under two different names.

@PaulBoersma PaulBoersma closed this Nov 6, 2019
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.

None yet

2 participants