"exwc test.ex > test.txt" create a UTF-8 file (checked with Notepad ), but surprisingly, "type test.txt" now show correctly the "n with tilde". Executing from the console "exwc test.ex" the "extended" letter is not displayed (a rectangle appears instead). The first letter of the string is a "n with tilde", a spanish letter not in the 0-127 range. Create the file "test.ex" using Notepad in the "UTF-8 without BOM" format with this single line: puts ( 1, "ñu\n" ) ![]() Open a console, set the Lucida Console font and execute "chcp 65001". It is strange that, in my tests, the output seems ok when redirected to a file, but it is not correctly displayed on the console. So, in summary, for Euphoria 3 programs, you have to convert your extended ASCII characters into the utf-8 equivalents before sending them to a Windows console. In which case you must also set the console code page to 65001 and use the "Lucinda Console" font. There will be a routine in Version 4 to convert many codes pages into Unicode (UTF32, UTF16, and UTF8).īy the way, I assume you are talking about sending text to a console window and not a Windows control object. ![]() Of course, plain ASCII (values 0 - 127) is already in UTF8 format but the byte values 128 - 255, used in code pages, are not converted. It does not convert Extended ASCII text into UTF-8. Can the Windows version of Euphoria output text in UTF-8 format?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |