Comments (2)
The second issue encountered was the from_bytes conversion in function std::wstring utf8_decode(const std::string &str) from indicators/display_width.hpp
Can you describe the issue that was encountered?
from indicators.
It seems that std::wstring_convert::from_bytes
does not like 4-byte characters on Windows with gcc and throws an exception:
terminate called after throwing an instance of 'std::range_error'
what(): wstring_convert::from_bytes
It is called in the return statement of utf8_decode
in indicators/display_width.hpp:285
. It works fine on WSL now, but still throws an exception when compiling the demo with gcc MinGW. It works with 3-byte emojis such as โ๏ธ.
Replacing utf8_decode
with the function in the linked SO answer seems to solve the issue.
With Terminus it works as expected, but there is another issue with 3-byte emojis using windows terminal which reproduces both on powershell profile and on wsl. This might be the fault of Windows Terminal though:
All emojis up to U+329x seem to exibit this behaviour (extra newlines), while emojis from U+1F00x seem to break on Windows without the mentioned fix (I picked some emojis randomly from this wikipedia article).
from indicators.
Related Issues (20)
- print to console HOT 2
- How to let indicator don't cover the print message? HOT 3
- Can i re-use a prior defined bar rather than define two separated bars? HOT 3
- [question] An `std::range_error` exception in `intermediate_progress_bar.cpp`.
- [bug] Cannot compile the sample codes with MSVC compiler on Windows.
- Passing boost::optional ProgressBar handle (from inside DynamicProgress) to function for mutation
- conversion to โfloatโ from โdoubleโ may alter its value [-Werror=float-conversion]
- Block progress bar not working
- Library does not compile. HOT 4
- C++17 deprecated codecvt_utf8 breaks build on MSVC with C++20 HOT 3
- continuously spinning line appears to be missing
- Write DynamicProgress bar to stderr
- indicators changes locale HOT 1
- Dynamically set MaxProgress during iteration
- setlocale in utf8_decode will throw std::logic_error when setlocale returns NULL
- In Windows console, the progress bar does not stay on the same line HOT 3
- Progress bar spamming in new lines depending on window width
- DynamicProgress should take ownership over progressbars HOT 3
- DynamicProgress progress bar ordering
- IndeterminateProgressScaleWriter loops forever when Lead is set to ""
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indicators.