Comments (6)
Try to use Enconding
property.
Also, please post code as text not images
from keralua.
Also, please post code as text not images
using static System.Console;
using NLua;
namespace ConsoleApp8
{
class Program
{
static Lua lua = new Lua();
static void Main(string[] args)
{
lua.DoString("os.setlocale'C' var = {['окс'] = 1} print(var['окс'])");
WriteLine("окс ok");
ReadLine();
}
}
}
from keralua.
class Program
{
static Lua lua = new Lua();
static void Main(string[] args)
{
lua.State.Encoding = System.Text.Encoding.UTF8;
lua.DoString("os.setlocale'C' var = {'окс'} print(var[1])");
WriteLine("окс ok");
ReadLine();
}
}
from keralua.
I tried change Encoding and it too doesn't work correctly.
static void Main(string[] args)
{
lua.State.Encoding = System.Text.Encoding.UTF8;
lua.DoString("print('hello привет')");
WriteLine("окс ok");
ReadLine();
}
from keralua.
Changing the Console.OutputEncoding to UTF8 did the trick for me.
Console.OutputEncoding = Encoding.UTF8;
Lua lua = new();
lua.State.Encoding = Encoding.UTF8;
lua.DoString("print('hello привет')");
Console.WriteLine("hello привет");
from keralua.
@Urbs97, thanks. It's fixed my problem.
from keralua.
Related Issues (20)
- Xamarin/Android: dlopen liblua53.so fails HOT 12
- Logo Copyright HOT 1
- Can't Build using VS 2019 Native Tools HOT 5
- 当lua代码出现死循环 我该怎么停止运行 这个时候button没有反应
- Fails to load lua53 assembly when building with Mono. HOT 9
- when reference by a classlib and build with any cpu (vs 2019) HOT 9
- State.NewLib State.SetFuncs: Attempted to read or write protected memory HOT 1
- Docs / Examples HOT 2
- How to use KeraLua.Lua.NewUserData correctly HOT 2
- LuaSocket Debugger Support
- Build fails in Ubuntu/WSL using latest git HOT 1
- Linux library is not portable across distributions HOT 1
- Is it thread clean , when use as one tread one lua VM
- Can you open only some libraries? HOT 5
- Why data can be written at an offset memory location? HOT 1
- Can The State Be Set?
- Value returned from Lua.FromIntPtr should not be Disposable HOT 6
- DllNotFoundException with Unity
- NLua.Exceptions.LuaScriptException:“[string "chunk"]:3: attempt to index a nil value (global 'bit')” HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keralua.