Comments (4)
@computerquip-streamlabs When dealing with Unicode, I only plan to support the UTF-8 encoding, because it is compatible with most libraries. May I know if UTF-8 is working for you?
from argtable3.
It does appear to. That said, the warnings given are valid. These would be incorrect in that case since they assume a 2-byte wchar_t type:
#define TRexChar unsigned short
#define MAX_CHAR 0xFFFF
#define _TREXC(c) L##c
#define trex_strlen wcslen
#define trex_printf wprintf
All functions that use TRexChar are then apt to some weird behavior since it's treated as a 2-byte string rather than a 1-byte string.
I need to try some more complicated UTF-8 codepoints as well that actually require more than one byte a codepoint... this is kinda worrying if I'm honest.
from argtable3.
It seems the trex code is only used for regex-based argument matching (and isn't used in general). I've just made sure none of my code uses that as I'm sure there's edge cases there. As a result though, I'm not affected and those warnings are little more than a nuisance now.
The original Trex code was meant for just ASCII and then Unicode support through wide-character support. That code would probably need to be modified to make sure it works with UTF-8 though I'm not sure. Some distinctive testing for UTF-8 with the regex argument parsing should probably be done.
from argtable3.
@computerquip-streamlabs I've removed the UNICODE support from the embedded TRex code. I've also fixed some Unicode-related issues so that even when you compile with UNICODE definition in Visual Studio, the library should be compiled successfully.
from argtable3.
Related Issues (20)
- Compilation error with optimization on ARM HOT 3
- License-related question HOT 4
- Implicit declaration of function 'vsnprintf' HOT 2
- Switch to FreeBSD getopt and getopt_long HOT 1
- Provide an option to use getopt_long_only
- Missing some information about the differences between v2 and v3 HOT 1
- When to release the new version? HOT 2
- Implicit declaration of getenv_s() HOT 4
- https issues on https://argtable.org/ - https://www.argtable.org/ fine HOT 1
- Add doc/examples to explain how to implement sub-commands
- Enhance CMake scripts to take advantage of vcpkg's manifest mechanism HOT 2
- clang vs gcc attributes HOT 3
- Static analyser: NULL pointer passing. HOT 3
- Use CodeQL to scan security vulnerabilities
- Table entries with empty glossary strings may displayed. HOT 2
- What is the recommended way to get all the args that have not been matched HOT 2
- index out of bound HOT 1
- arg_print_formatted_ds does not reset column count when reaching newline HOT 2
- Minus symbol stripped from negative numbers HOT 2
- Missing include install path in CMake config export HOT 2
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 argtable3.