Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7838217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:02:25+00:00 2026-06-02T15:02:25+00:00

I need to script my app (not a game) and I have a problem,

  • 0

I need to script my app (not a game) and I have a problem, choosing a script lang for this.
Lua looks fine (actually, it is ideal for my task), but it has problems with unicode strings, which will be used.
Also, I thought about Python, but I don’t like It’s syntax, and it’s Dll is too big for me ( about 2.5 Mib).
Python and other such langs have too much functions, battaries and modules which i do not need (e.g. I/O functions) – script just need to implement logic, all other will do my app.
So, I’d like to know is there a scripting lang, which satisfies this conditions:

  • unicode strings
  • I can import C++ functions and then call them from
    script
  • Can be embedded to app (no dll’s) without any problems

Reinventing the wheel is not a good idea, so I don’t want to develop my own lang.
Or there is a way to write unicode strings in Lua’s source? Like in C++ L”Unicode string”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:02:26+00:00Added an answer on June 2, 2026 at 3:02 pm

    There isn’t really such a thing as a “unicode string”. Strings are a sequence of bytes that can contain anything. Knowing the encoding of the data in the string matters, though.

    I use Lua with UTF-8 strings, which just works for all the operations I care about. I do not use any Unicode string library, though those are available for Lua (ICU4Lua, slnunicode, etc.).

    Some notes about using UTF-8 strings in Lua:

    • String length (# operator) returns the string length in bytes, not characters or codepoints (non-ASCII characters may be sequences of multiple bytes).
    • String splitting (e.g. string.sub) must not split up UTF-8 sequences.
    • String matching works (string.find, string.match) fine with ASCII patterns.
    • Substring searching (such as string.find in ‘plain’ mode) works with UTF-8 as the needle or the haystack.

    Counting codepoints in UTF-8 is quite straightforward, if slightly less efficient than other encodings. For example in Lua:

    function utf8_length(str)
            return select(2, string.gsub(str, "[^\128-\193]", ""));
    end
    

    If you need more than this kind of thing, the unicode libraries I mentioned give you APIs for everything, including conversion between encodings.

    Personally I prefer this straightforward approach to any of the languages that force a certain flavour of unicode on you (such as Javascript) or try and be clever by having multiple encodings built into the language (such as Python). In my experience they only cause headaches and performance bottlenecks.

    In any case, I think every developer should have a good basic understanding of how unicode works, and the principle differences between different encodings so that they can make the best choice about how to handle unicode in their application.

    For example if all your existing strings in your application are in a wide-char encoding, it would be much less convenient to use Lua as you would have to add a conversion to every string in and out of Lua. This is entirely possible, but if your app might be CPU-bound (as in a game) then it would be a negative point performance-wise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script with infinite loop. I need this script running forever.
I want to launch an app on OSX from a script. I need to
I have a fileA with a snippet of code, and I need a script
I have a command line php app that I need to distribute to a
I have a python app, that I'm developing. There is a need to use
I need to know if it is possible to do this. I have an
I have a script in app/vendors/shells which is executed periodically via cron. In that
I need help with my app.yaml and url management. I have the scripts ting.py
in my app i need to send an javascript Array object to php script
I have got a basic server-side Erlang app (not fully OTP'd yet) which I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.