derickc / Fountainhead

Contextual Sublime Text screenwriting environment using the Fountain screenplay syntax.
http://classicblunders.com/fountainhead/
Other
72 stars 13 forks source link

Support Unicode letters in scenes/character lists #3

Closed fricy closed 9 years ago

fricy commented 9 years ago

In lists: Character names with accented letters get ignored, but char. list works. EDIT: If I force a character using @ the char. list will break like the scene list. Scene names with accented letters stop the script from working, scene list doesn't work at all. (the generated .sublime-completions files are broken)

Formatting: Character formatting doesn't work if name contains accented letter, name is ignored, and con't is appended to the previous character when doing dialog. Forcing with @ is a viable workaround. Scene formatting works with accented letters.

Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 303, in on_activated callback.on_activated(v) File ".../Sublime Text 3/Packages/Fountainhead/characters.py", line 179, in on_activated completions.write('"%s",' % character) UnicodeEncodeError: 'ascii' codec can't encode character '\xc1' in position 9: ordinal not in range(128) Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 303, in on_activated callback.on_activated(v) File ".../Sublime Text 3/Packages/Fountainhead/scenes.py", line 147, in on_activated completions.write('"%s",' % scene) UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 12: ordinal not in range(128) Error loading completion: Error trying to parse file: Expected character in Packages/User/Fountainhead/Characters.sublime-completions:5:4 Error loading completion: Error trying to parse file: Expected character in Packages/User/Fountainhead/Scenes.sublime-completions:5:4

derickc commented 9 years ago

Thanks for the detailed report. I hope to have a solution soon.

derickc commented 9 years ago

Just pushed the changes to support accented characters. Let me know if it works for you.

fricy commented 9 years ago

Thank you for the fast update, looks 99% fixed. Only problem I could find was with formatting some Character names containing the letter Ő Ű. Fix in PR.