Also I need locale aware case conversion. .NET do this very well. Do us C++ programmers have to wait 100 years for such thing ? I am aware of the ICU library but it's 20MB and I can't even get to link my code with it... All in all I want to end this nightmare..
is there a cross-platform unicode string class that I can use both on Win32 and MacOSX systems?
1.2k Views Asked by fgungor At
2
There are 2 best solutions below
2
Matt Joiner
On
- libiconv is a cross platform unicode library, a part of glibc, and part of the POSIX.1-2001 standard. It's also available on Mac and Windows.
- UTF-8 is a character encoding that is backwards compatible with ASCII.
- C strings are null terminated byte arrays that can hold ASCII and UTF-8.
That's all you need. Encode/decode to UTF-16 and UCS-32 or what have you when required to interface with legacy operating systems.
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in UNICODE
- Question about unicode assignments in python
- Can't we make a better variable-length character encoding with just using the 1 bit extra in the 7 bit ASCII?
- UTF-8 string has too many bytes using SBCL and babel on Windows 64 bits
- how to implement ZWJ and NZWJ in fontlab
- charAt() on HTML entities
- NCURSESW - Unable to use addwstr function to print out unicode characters outside of standard ASCII
- pdftk unicode works in preview but not adobe acrobat
- How to store metadata for a UTF-8 text file cross-platform?
- Is there a 'bottom-to-top' equivalent of the unicode 'rtl override'?
- pdftk generated pdf does not render correct utf-8
- How do I add a bullet point before a line of text in ZPL on a Zebra ZD500R?
- Visual C++ - how can I turn a unicode character into char or string?
- Getting error 'Some bytes have been replaced with the Unicode substitution character while loading file ... with Unicode (UTF-8)"
- French special characters unicode required for first name
- How to use HTML5 input pattern attribute to validate Latin and extended Latin characters only
Related Questions in LOCALE
- Set Netbeans Console to English
- How can I copy a date from excel to powerpoint through vba and forcing english format regardless of local formatting?
- Formatting very large numbers to local settings in javascript
- Accessing locale in nextJS 14 App Directory
- GetDateFormatEx returns a non-zero value but the buffer returned by it is faulty
- Remove grouping from numpunct of std::locale
- Fullcalendar locale doesn't work in Chorme and Edge
- Rewriting URL using Locale in Next JS 13
- Javascript: Date string in different locale to Timestamp
- How to parse country code from RFC 5646 locale string?
- Wrong Hungarian (hu_HU) sort order
- Change language in keycloak login page
- After updating application locale of an android app, toast message is showing in previous language
- How to set default stings.xml using AppCompatDelegate in android?
- How to set language for a Vonage's sms in Laravel?
Related Questions in UPPERCASE
- Postgres PSQL on Windows do not connect (authentication failed) for a user with uppercases
- Flutter Make Textfield input become uppercase
- How to convert uppercase/lowercase turkish letters to each other?
- Issue with 'upper-case' module in Node.js: ERR_REQUIRE_ESM when using require()
- Make all the first letters uppercase except for words with at max 3 characters
- Excel VBA advanced filter - uppercase
- Finding uppercase letters
- Need to change text to upper case in JavaScript - createJs
- Why does setting a nullable type to null result in an "Overload resolution ambiguity"?
- Failing to convert upper to lower and vice versa user input string
- X64 Assembly uppercase function
- Kotlin/TeamCity environment variable to uppercase
- problems with case sensitive when migrating php site from windows apache to linux apache
- The name of database and for each table isn't uppercase in the first letter of the word when I using JPA Hibernate
- Python-docx confuses upper and lowercase in extracted text portions
Related Questions in UNICODE-STRING
- PHP - How to decode or parse emoji from unicode string?
- How to add accents to letters in java
- What's the difference between JavaScript's `String.slice()` method and PHP's `mb_substr` function?
- WinForms TextBox doesn't reliably display non-spacing Unicode character that displays properly in a CheckedListBox
- convert byte array to strings split by NUL character
- Does Javascript have a way to parse numeric strings accounting for different global character sets?
- Understanding Font header file used in MCU code
- Unicode (Devanagari) characters not showing up correctly in HTML dropdown and text-field tags
- Error compiling a boost qi parser to skip all comments and spaces in a php code string
- Yet another Unicode preg_replace() question
- Is it possible to modify TStringField class (with new property)
- How do I get accented letter using substring()?
- Foldcase conversion between (German) lower ß (U+00DF) and upper ẞ (U+1E9E)?
- Imagemagick annotate with Unicode characters
- In python, how do you get the escape sequence for any Unicode character?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You might want to use the API provided by the operating system. Windows has NLS API that deals with locale specific string comparison and case conversion.
Standalone Unicode Libraries are ICU and IConv. Both require some time to learn. The data file is also quite large - expect to carry > 10M data files to support most languages.
BTW, your link error is typically caused by the fact that you specified a static library but the imported function has dllimport attribute which specifies a DLL. By default ICU header files declare dllimport on its APIs. You need to define a macro before including the ICU header.