Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jun 12, 2024
1 parent d53527a commit a85a006
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/builtin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ namespace jule
inline void out(const T &obj) noexcept
{
#ifdef OS_WINDOWS
//const std::vector<jule::U16> utf16_str = jule::utf16_from_str(jule::to_str<T>(obj));
const std::vector<jule::U16> utf16_str = jule::utf16_from_str(jule::to_str<T>(obj));
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
//WriteConsoleW(handle, utf16_str.data(), utf16_str.size(), nullptr, nullptr);
SetConsoleOutputCP(1200);
const wchar_t s[] = {231, 97, 231, 97, 32, 107, 117, 351, 117, 0};
std::wcout << s;
WriteConsoleW(handle, utf16_str.data(), utf16_str.size(), nullptr, nullptr);
#else
std::cout << obj;
#endif
Expand Down
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "api/jule.hpp"
#include <fcntl.h>
#include <io.h>

int main() {
_setmode(_fileno(stdout), _O_U16TEXT);
jule::outln("çaça kuşu");
return 0;
}

0 comments on commit a85a006

Please sign in to comment.