sqdpanda Posted August 23, 2018 Share Posted August 23, 2018 Функции типа string.lower, string.sub, string.upper не работают с русским языком Как исправить? Пример: function protection(msg) cancelEvent() local msg1 = removeHex(msg,6) local msg2 = string.lower(msg1) local firstLetter = string.sub(msg2, 1, 1) local tail = string.sub(msg2, 2) local msg3 = string.upper(firstLetter) .. tail local msg4 = rgbHex(getPlayerNametagColor(source))..getPlayerName(source)..'#FFFFFF: '..msg3 outputChatBox(msg4,getRootElement(), 255, 255, 255, true) end addEventHandler('onPlayerChat',root,protection) https://imgur.com/a/snOARnP Оба сообщения написаны капсом Link to comment
TheNormalnij Posted August 23, 2018 Share Posted August 23, 2018 Используйте utf* функции вместо страндартных. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now