Cut to file character encoding issue creates empty file
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
Research direction
Start with advanced_new_file.commands.cut_to_file, especially entered_file_action and _open_and_add_content_to_file, which appear in the traceback. Reproduce the issue with a UTF-8 CSV containing the reported character, then verify that Cut to file completes without the UnicodeEncodeError and preserves the file content.
Written by the indexing model from the issue text.
Description
I have UTF8 .csv file and Cut to file doesn't work.
From the console:
Traceback (most recent call last):
File "advanced_new_file.commands.command_base in \Data\Installed Packages\AdvancedNewFile.sublime-package", line 315, in on_done
File "advanced_new_file.commands.command_base in \Data\Installed Packages\AdvancedNewFile.sublime-package", line 344, in entered_filename
File "advanced_new_file.commands.cut_to_file in \Data\Installed Packages\AdvancedNewFile.sublime-package", line 47, in entered_file_action
File "advanced_new_file.commands.cut_to_file in \Data\Installed Packages\AdvancedNewFile.sublime-package", line 71, in _open_and_add_content_to_file
File "./encodings/cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\u021b' in position 20: character maps to <undefined>
Thanks!
- Dominant language
- Python
- Stars
- 832
- Forks
- 96
- Avg merge
- 1m
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SublimeText/AdvancedNewFile
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SublimeText/AdvancedNewFile#196 · 1 reaction ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
SublimeText/AdvancedNewFile#195 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
SublimeText/AdvancedNewFile#193 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
SublimeText/AdvancedNewFile#183 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
SublimeText/AdvancedNewFile#180 ·
All issues in SublimeText/AdvancedNewFile
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#759 ·