digitalmars.D.learn - String characters not extended
- Ignacious (5/5) Jan 02 2017 when one prints out a string with some extended(I guess it's
- Nicholas Wilson (2/7) Jan 02 2017 It should Just work. can you paste the source and output?
- bauss (5/10) Jan 02 2017 Most likely not an issue with D, but your console's display
- Anonymouse (9/10) Jan 03 2017 Assuming Windows:
- Daniel =?iso-8859-1?b?S2964Ws=?= via Digitalmars-d-learn (5/17) Jan 03 2017 Why do not use CP_UTF8 constant instead of 65001? It is safer, easier=20
- Anonymouse (3/5) Jan 04 2017 I have no reason to back it up with. I'm literally just
when one prints out a string with some extended(I guess it's unicode), writeln prints out the ascii versions that do not correspond to what they really are. e.g., an umlaut is printed out as 1/2 or something. how to get it to print the correct codes?
Jan 02 2017
On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:when one prints out a string with some extended(I guess it's unicode), writeln prints out the ascii versions that do not correspond to what they really are. e.g., an umlaut is printed out as 1/2 or something. how to get it to print the correct codes?It should Just work. can you paste the source and output?
Jan 02 2017
On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:when one prints out a string with some extended(I guess it's unicode), writeln prints out the ascii versions that do not correspond to what they really are. e.g., an umlaut is printed out as 1/2 or something. how to get it to print the correct codes?Most likely not an issue with D, but your console's display encoding. Else your standard output might have ASCII as encoding and then you'd have to change it. What OS are you on?
Jan 02 2017
On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:[...]Assuming Windows: version(Windows) shared static this() { import core.sys.windows.windows; SetConsoleCP(65001); SetConsoleOutputCP(65001); }
Jan 03 2017
Anonymouse via Digitalmars-d-learn <digitalmars-d-learn puremagic.com>=20 napsal =C3=9At, led 3, 2017 v 12=E2=88=B634 :On Monday, 2 January 2017 at 21:07:37 UTC, Ignacious wrote:Why do not use CP_UTF8 constant instead of 65001? It is safer, easier=20 to read and understand =[...]=20 Assuming Windows: =20 version(Windows) shared static this() { import core.sys.windows.windows; SetConsoleCP(65001); SetConsoleOutputCP(65001); }
Jan 03 2017
On Tuesday, 3 January 2017 at 19:40:20 UTC, Daniel Kozák wrote:Why do not use CP_UTF8 constant instead of 65001? It is safer, easier to read and understandI have no reason to back it up with. I'm literally just copy/pasting what others have suggested I use.
Jan 04 2017