char is always UTF-8 codepoint and therefore exactly 1 byte.

wchar is always UTF-16 codepoint and therefore exactly 2 bytes.

dchar is always UTF-32 codepoint and therefore exactly 4 bytes;

'Ğ' has the value U+011E which is a lot larger than what 1 byte can hold. You need 2 chars or 1 wchar/dchar.

https://unicode-table.com/en/011E/

Reply via email to