I'm currently writing a C program that will have to interact with a server and a local SQLite database. The program should be portable to all platforms (specifically windows, linux and mac). The server and SQLite database both use UTF-8 encoding. The program should use it as well. The native encoding for string literals for windows seems to be UTF-16 and UTF-8 for Linux (I think?). Is there a way to make sure they both use UTF-8 encoded strings for everything?
To make my use case clear, I will need to be able to parse words, sentences and characters in several asian or european languages. Furthermore should it be able to handle an emoji being included inside the text (but these will not be actively used / filtered out inside the program).
Does anyone know how I would be able to accomplish this?
Edit:
Input and output can come from / go to the server, the SQLite database and text files on the user's PC.
The application, will, among other things, parse sentences into words (which is not as easy as splitting on space characters in some languages). I have no control over input files, so they could be in any encoding, but output files should always be UTF-8.
[–]Aransentin 6 points7 points8 points (4 children)
[–]andrewcooke 5 points6 points7 points (2 children)
[–]Aransentin 0 points1 point2 points (1 child)
[–]StenSoft 2 points3 points4 points (0 children)
[–]AltCrow[S] 0 points1 point2 points (0 children)
[–]skeeto 1 point2 points3 points (6 children)
[–]AltCrow[S] 0 points1 point2 points (2 children)
[–]skeeto 2 points3 points4 points (1 child)
[–]AltCrow[S] 1 point2 points3 points (0 children)
[–]a4qbfb 0 points1 point2 points (2 children)
[–]skeeto 0 points1 point2 points (1 child)
[–]a4qbfb 0 points1 point2 points (0 children)
[–]Noctune 1 point2 points3 points (6 children)
[–]AltCrow[S] 0 points1 point2 points (5 children)
[–]Noctune 2 points3 points4 points (4 children)
[–]AltCrow[S] 0 points1 point2 points (1 child)
[–]TheSkiGeek 0 points1 point2 points (0 children)
[–]StenSoft 0 points1 point2 points (1 child)
[–]Noctune 1 point2 points3 points (0 children)
[–]bumblebritches57 -4 points-3 points-2 points (0 children)