Better C++ runtime error for non-UTF-8 content
See original GitHub issuePassing a file with non-UTF-8 to a C+±runtime-compiled Antlr 4 parser typically yields an error like:
libc++abi.dylib: terminating with uncaught exception of type std::range_error: wstring_convert: from_bytes error
In this situation a user would greatly benefit from knowing 1) that their file has non-UTF-8 content (nothing in the error message indicates this) and 2) The (preceding-UTF-8-relative) line number and offset of the first non-UTF-8 bytes.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Access Error: invalid UTF-8 encoding ${FFD8FFE0}
I have found a few commands such read where I can't execute the code because of the file encoding. save %/c/users/abagget/desktop/bay.jpg read ...
Read more >utf-8 (Set source and execution character sets to UTF-8)
You can use the /utf-8 option to specify both the source and execution character sets as encoded by using UTF-8.
Read more >Is it possible to set "locale" of a Windows application to UTF-8?
Starting in Windows 10 build 17134 (April 2018 Update), the Universal C Runtime supports using a UTF-8 code page.
Read more >R6034 Runtime Error! An application has made an attempt to ...
An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.
Read more >Programming for UTF-8 Encoding - NI - National Instruments
LabWindows/CVI detects and reports non-fatal runtime errors when a LabWindows/CVI library function receives a string whose bytes do not ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@parrt I don’t know of any PR for this issue.
Ok, thanks @iterumllc closing per your comment.