Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong encoding in Russian language #9

Closed
potat-dev opened this issue Oct 3, 2021 · 1 comment
Closed

Wrong encoding in Russian language #9

potat-dev opened this issue Oct 3, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@potat-dev
Copy link
Owner

in the code, this line
https://github.com/DenCoder618/SUAI-Labs/blob/83277491c9d98a3e8ceb22def1abb90d9bca8b01/Lab_5/Lab_5.c#L51
with #define USE_RUS 1 prints following:

Введите строку:

I think this is because of Windows cp1251 encoding

@potat-dev potat-dev added the bug Something isn't working label Oct 3, 2021
@potat-dev potat-dev self-assigned this Oct 3, 2021
@potat-dev
Copy link
Owner Author

fixed this with

#include <locale.h>

setlocale(LC_ALL, "Russian");
system("chcp 1251");

and save file with Cyrillic Windows 1251 encoding
Ctrl + Shift + P -> Change File Encoding -> Save with encoding -> Cyrillic Windows 1251

potat-dev added a commit that referenced this issue Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant