Jump to content
  • 0

Modder request: add UTF-8 support for Lua


Rinart73

Suggestion

Since now game is being localized into several languages, we faced new problem: most of non-English languages use some characters that are being encoded with more that 1 char.

 

Currently we have Lua 5.2. Upgrading to Lua 5.3 will give some basic UTF-8 functions implemented on C-level, but it will not be

enough for comfortable coding.

 

Of course, you might say, there is a pure-lua libraries that allow you to search and even replace UTF-8 strings. It is true. But when it comes to such simple things as string.lower/upper, real problems start. It's kinda hard and not performance-wise to map all character table upper-lower variants in Lua.

 

I recently tried to make a cargo search mod. And believe me, utf8.find function and my string.upper workaround are really not performance-friendly.

 

So, please, add UTF-8 support on C++ level.

 

You can use free solutions like this one (Github link)

Link to comment
Share on other sites

0 answers to this suggestion

Recommended Posts

There have been no answers to this suggestion yet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...