Cyrillic support in lua script












0















Can someone help me with this code? I must somehow add cyrillic support to it else i got strange symbold instead of right text



function ch0script()
--ch0-main
if cl == 1 then
bgUpdate('residential')
audioUpdate('2')
cw('Тестовый тест')
elseif cl == 2 then
cw('bl', 'Тест')
elseif cl == 3 then
cw('bl', 'That girl is Sayori, my neighbor and good friend since we were children.')
elseif cl == 4 then
cw('bl',"You know, the kind of friend you'd never see yourself making today, but it just kind of works out because you've known each other for so long?")
elseif cl == 5 then
cw('bl','We used to walk to school together on days like this, but starting around high school she would oversleep more and more frequently, and I would get tired of waiting up.')
elseif cl == 6 then
cw('bl','But if she's going to chase after me like this, I almost feel better off running away.')
elseif cl == 7 then
cw('bl','However, I just sigh and idle in front of the crosswalk and let Sayori catch up to me.')


IMAGE



3DS photo










share|improve this question




















  • 3





    You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

    – jdv
    Nov 13 '18 at 15:11













  • I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

    – lhf
    Nov 13 '18 at 15:21













  • I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

    – Klopar
    Nov 13 '18 at 15:26











  • They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

    – Klopar
    Nov 13 '18 at 15:30













  • It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

    – Egor Skriptunoff
    Nov 13 '18 at 17:05


















0















Can someone help me with this code? I must somehow add cyrillic support to it else i got strange symbold instead of right text



function ch0script()
--ch0-main
if cl == 1 then
bgUpdate('residential')
audioUpdate('2')
cw('Тестовый тест')
elseif cl == 2 then
cw('bl', 'Тест')
elseif cl == 3 then
cw('bl', 'That girl is Sayori, my neighbor and good friend since we were children.')
elseif cl == 4 then
cw('bl',"You know, the kind of friend you'd never see yourself making today, but it just kind of works out because you've known each other for so long?")
elseif cl == 5 then
cw('bl','We used to walk to school together on days like this, but starting around high school she would oversleep more and more frequently, and I would get tired of waiting up.')
elseif cl == 6 then
cw('bl','But if she's going to chase after me like this, I almost feel better off running away.')
elseif cl == 7 then
cw('bl','However, I just sigh and idle in front of the crosswalk and let Sayori catch up to me.')


IMAGE



3DS photo










share|improve this question




















  • 3





    You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

    – jdv
    Nov 13 '18 at 15:11













  • I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

    – lhf
    Nov 13 '18 at 15:21













  • I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

    – Klopar
    Nov 13 '18 at 15:26











  • They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

    – Klopar
    Nov 13 '18 at 15:30













  • It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

    – Egor Skriptunoff
    Nov 13 '18 at 17:05
















0












0








0








Can someone help me with this code? I must somehow add cyrillic support to it else i got strange symbold instead of right text



function ch0script()
--ch0-main
if cl == 1 then
bgUpdate('residential')
audioUpdate('2')
cw('Тестовый тест')
elseif cl == 2 then
cw('bl', 'Тест')
elseif cl == 3 then
cw('bl', 'That girl is Sayori, my neighbor and good friend since we were children.')
elseif cl == 4 then
cw('bl',"You know, the kind of friend you'd never see yourself making today, but it just kind of works out because you've known each other for so long?")
elseif cl == 5 then
cw('bl','We used to walk to school together on days like this, but starting around high school she would oversleep more and more frequently, and I would get tired of waiting up.')
elseif cl == 6 then
cw('bl','But if she's going to chase after me like this, I almost feel better off running away.')
elseif cl == 7 then
cw('bl','However, I just sigh and idle in front of the crosswalk and let Sayori catch up to me.')


IMAGE



3DS photo










share|improve this question
















Can someone help me with this code? I must somehow add cyrillic support to it else i got strange symbold instead of right text



function ch0script()
--ch0-main
if cl == 1 then
bgUpdate('residential')
audioUpdate('2')
cw('Тестовый тест')
elseif cl == 2 then
cw('bl', 'Тест')
elseif cl == 3 then
cw('bl', 'That girl is Sayori, my neighbor and good friend since we were children.')
elseif cl == 4 then
cw('bl',"You know, the kind of friend you'd never see yourself making today, but it just kind of works out because you've known each other for so long?")
elseif cl == 5 then
cw('bl','We used to walk to school together on days like this, but starting around high school she would oversleep more and more frequently, and I would get tired of waiting up.')
elseif cl == 6 then
cw('bl','But if she's going to chase after me like this, I almost feel better off running away.')
elseif cl == 7 then
cw('bl','However, I just sigh and idle in front of the crosswalk and let Sayori catch up to me.')


IMAGE



3DS photo







lua locale cyrillic nintendo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 15:06







Klopar

















asked Nov 13 '18 at 14:41









KloparKlopar

13




13








  • 3





    You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

    – jdv
    Nov 13 '18 at 15:11













  • I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

    – lhf
    Nov 13 '18 at 15:21













  • I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

    – Klopar
    Nov 13 '18 at 15:26











  • They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

    – Klopar
    Nov 13 '18 at 15:30













  • It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

    – Egor Skriptunoff
    Nov 13 '18 at 17:05
















  • 3





    You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

    – jdv
    Nov 13 '18 at 15:11













  • I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

    – lhf
    Nov 13 '18 at 15:21













  • I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

    – Klopar
    Nov 13 '18 at 15:26











  • They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

    – Klopar
    Nov 13 '18 at 15:30













  • It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

    – Egor Skriptunoff
    Nov 13 '18 at 17:05










3




3





You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

– jdv
Nov 13 '18 at 15:11







You should be clear what you mean about "getting strange characters". Strange characters where? Show, as an edit the results that are the key part of this question. Also, make sure this code is a Minimal, Complete, and Verifiable example; someone should be able to copy and paste your example code into a Lua environment with minimal editing. Basically, Lua strings are, internally, 8-bit clean. But how those bytes are represented as "characters" in some output device depends on a lot of other things.

– jdv
Nov 13 '18 at 15:11















I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

– lhf
Nov 13 '18 at 15:21







I don't know what cw does, but Lua strings support UTF-8 chars like this: "u{0422}".

– lhf
Nov 13 '18 at 15:21















I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

– Klopar
Nov 13 '18 at 15:26





I think Cyrillic symbols are encoding to UTF-8. That code is for Nintendo Switch Homebrew. I will attach photo of symbols that i get.

– Klopar
Nov 13 '18 at 15:26













They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

– Klopar
Nov 13 '18 at 15:30







They are transforming to that symbols from "Тест", also first "Тестовый тест" too have that problem with text output

– Klopar
Nov 13 '18 at 15:30















It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

– Egor Skriptunoff
Nov 13 '18 at 17:05







It seems UTF-8 wouldn't help here. Your system uses 1-byte encoding (Windows-1252). You need to force it using Windows-1251 (or UTF-8). You can do nothing in your program. Try to modify settings/environment of your host program.

– Egor Skriptunoff
Nov 13 '18 at 17:05














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283462%2fcyrillic-support-in-lua-script%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283462%2fcyrillic-support-in-lua-script%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python