Click here to Skip to main content
16,019,147 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Character set Pin
Calin Negru12-Sep-24 23:46
Calin Negru12-Sep-24 23:46 
GeneralRe: Character set Pin
Mircea Neacsu13-Sep-24 0:06
Mircea Neacsu13-Sep-24 0:06 
GeneralRe: Character set Pin
trønderen13-Sep-24 9:33
trønderen13-Sep-24 9:33 
GeneralRe: Character set Pin
Mircea Neacsu13-Sep-24 17:17
Mircea Neacsu13-Sep-24 17:17 
GeneralRe: Character set Pin
trønderen14-Sep-24 7:25
trønderen14-Sep-24 7:25 
GeneralRe: Character set Pin
Mircea Neacsu14-Sep-24 15:10
Mircea Neacsu14-Sep-24 15:10 
GeneralRe: Character set Pin
trønderen14-Sep-24 17:27
trønderen14-Sep-24 17:27 
GeneralRe: Character set Pin
Mircea Neacsu15-Sep-24 2:26
Mircea Neacsu15-Sep-24 2:26 
trønderen wrote:
After all, I guess I really disagree with you
World would be too boring if we wouldn't have different opinions Laugh | :laugh:

trønderen wrote:
I want one single unambiguous string format.
You aren't going to get it, or at least not in this lifetime Smile | :) . If you go to Linux or Mac worlds, everything is UTF-8. In Windows world it's UTF-16 with a sprinkle of UTF-8.

trønderen wrote:
But I also want to have one singe unambiguous file format. UTF-8 is established, UTF-16 is not. So UTF-8 wins.
If I understand you correctly, you suggest having UTF-8 files converted to UTF-16 on entry, processed as UTF-16 inside the application and converted back to UTF-8 on output. That would complicate things very much if you target different OS-es. It would also be inefficient if your app doesn't require the UTF-16 parts of the OS (ReadFile and WriteFile functions in Windows work with any encoding).

My strategy is almost a mirror image of that: Everything is UTF-8 until it needs to call certain OS functions when a thin wrapper converts all inputs to UTF-16 and all results back to UTF-8.
Mircea

GeneralRe: Character set Pin
trønderen15-Sep-24 12:16
trønderen15-Sep-24 12:16 
GeneralRe: Character set Pin
Richard MacCutchan15-Sep-24 21:08
mveRichard MacCutchan15-Sep-24 21:08 
GeneralRe: Character set Pin
Mircea Neacsu16-Sep-24 2:41
Mircea Neacsu16-Sep-24 2:41 
GeneralRe: Character set Pin
jschell17-Sep-24 12:29
jschell17-Sep-24 12:29 
GeneralRe: Character set Pin
Richard MacCutchan14-Sep-24 21:34
mveRichard MacCutchan14-Sep-24 21:34 
GeneralRe: Character set Pin
Mircea Neacsu15-Sep-24 2:45
Mircea Neacsu15-Sep-24 2:45 
GeneralRe: Character set Pin
Richard MacCutchan15-Sep-24 2:58
mveRichard MacCutchan15-Sep-24 2:58 
GeneralRe: Character set Pin
trønderen15-Sep-24 12:19
trønderen15-Sep-24 12:19 
GeneralRe: Character set Pin
Mircea Neacsu17-Sep-24 13:49
Mircea Neacsu17-Sep-24 13:49 
GeneralRe: Character set Pin
jschell17-Sep-24 12:22
jschell17-Sep-24 12:22 
GeneralRe: Character set Pin
CPallini13-Sep-24 0:06
mveCPallini13-Sep-24 0:06 
GeneralRe: Character set Pin
Calin Negru13-Sep-24 1:32
Calin Negru13-Sep-24 1:32 
GeneralRe: Character set Pin
CPallini13-Sep-24 1:34
mveCPallini13-Sep-24 1:34 
GeneralRe: Character set Pin
trønderen14-Sep-24 6:48
trønderen14-Sep-24 6:48 
GeneralRe: Character set Pin
Calin Negru14-Sep-24 9:18
Calin Negru14-Sep-24 9:18 
GeneralRe: Character set Pin
k505414-Sep-24 10:15
mvek505414-Sep-24 10:15 
GeneralRe: Character set Pin
markkuk14-Sep-24 11:15
markkuk14-Sep-24 11:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.