fork download
  1. #include <stdio.h>
  2. #include <wchar.h>
  3. #include <locale.h>
  4.  
  5. #define USE_W
  6.  
  7. int main()
  8. {
  9. setlocale(LC_ALL, "en_US.UTF-8");
  10. #ifdef USE_W
  11. const wchar_t *ae_utf16 = L"\x00E6 & ASCII text ae\n";
  12. wprintf(ae_utf16);
  13. #else
  14. const char *ae_utf8 = "\xC3\xA6 & ASCII text ae\n";
  15. printf(ae_utf8);
  16. #endif
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
æ & ASCII text ae