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 978899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:07:57+00:00 2026-05-16T04:07:57+00:00

If I were creating a videogame level editor in AS3 or .NET with a

  • 0

If I were creating a videogame level editor in AS3 or .NET with a string-based level format, that can be copied, pasted and emailed, how much data could I encode into each character? What is important is getting the maximum amount of data for the minimum amount of characters displayed on the screen, regardless of how many bytes the computer is actually using to store these characters.

For example if I wanted to store the horizontal position of an object in 1 string character, how many possible values could that have? Are there are any characters that can’t be sent over a the internet, or that can’t be copy and pasted? What difference would things like UTF8 make? Answers please for either AS3 or C#/.NET, or both.

2nd update: ok so Flash uses UTF16 for its String class. There are lots of control characters that I cannot use. How could I manage which characters are ok to use? Just a big lookup table? And can operating systems and browser handle UTF16 to the extent that you can safely copy and paste a UTF16 string into an email, notepad, etc?

  • 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-05-16T04:07:57+00:00Added an answer on May 16, 2026 at 4:07 am

    Updated: “update 1”, “update 2”

    You can store 8 Bits in a single charakter with ANSI, ASCII or UTF-8 encoding.

    But, for example, if you whant to use ASCII-Encoding you shouldn’t use the first 5 bits (0001 1111 = 0x1F) and the chars 0x7F there are represent system-charaters like “Escape, null, start of text, end of text ..) who are not can be copy and paste. So you could store 223 (1110 0000 = 0xE0) different informations in one single charakter.

    If you use UTF-16 you have 2 bytes = 16 bits – system-characters to store your informationen.

    A in UTF-8 Encoding: 0x0041 (the first 2 digits are every 0!) or 0x41
    A in UTF-16 Encoding: 0x0041 (the first 2 digits can be higher then 0) 
    A in ASCII Encoding: 0x41 
    A in ANSI Encoding: 0x41
    

    see images at the and of this post!

    update 1:

    If you not need to modify the values without any tool (c#-tool, javascript-base webpage, …) you can alternative base64 or zip+base64 your informationens. this solution avoid the problem that you descript in your 2nd update. “here are lots of control characters that I cannot use. How could I manage which characters are ok to use?”

    If this is not an option you can not avoid to use any type of lookup-table.
    the shortest way for an lookuptable are:

    var illegalCharCodes = new byte[]{0x00, 0x01, 0x02, ..., 0x1f, 0x7f};
    

    or you code it like this:

    //The example based on ASNI-Encoding but in principle its the same with utf-16
    var value = 0;
    if(charcode > 0x7f)
      value = charcode - 0x1f - 1; //-1 because 0x7f is the first illegalCharCode higher then 0x1f
    else
      value = charcode - 0x1f;
    value -= 1; //because you need a 0 value;
    //charcode: 0x20 (' ') -> value: 0
    //charcode: 0x21 ('!') -> value: 1
    //charcode: 0x22 ('"') -> value: 2
    //charcode: 0x7e ('~') -> value: 94
    //charcode: 0x80 ('€') -> value: 95
    //charcode: 0x81 ('�') -> value: 96
    //..
    

    update 2:

    for Unicode (UTF-16) you can use this table: http://www.tamasoft.co.jp/en/general-info/unicode.html
    Any character represent with a symbol like or are empty you should not use.
    So you can not store 50,000 possible values in one utf-16 character if you allow to copy and past them. you need any spezial-encoder and you must use 2 UTF-16 character like:

    //charcode: 0x0020 + 0x0020 ('  ') > value: 0
    //charcode: 0x0020 + 0x0020 (' !') > value: 2
    //charcode: 0x0020 + 0x0020 ('!A') > value: something higher 40.000, i dont know excatly because i dont have count the illegal characters in UTF-16 :D
    

    ASCII-Table
    ASCII-Table extended
    (source: asciitable.com)

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

Sidebar

Related Questions

Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a calculator-like dialog, I noticed that quickly clicking on a button in IE
Creating an installer for possible remote systems so that if they do not have
Creating a simple TCP server based on examples but still do not get how
Creating a web interface so our helpdesk can create users and setup some of
Creating a patch utility that will update my current website with my patch. when
creating a landing page that sends an email when people submit their address. I'd
Creating My Windows Form Application and using ADO.Net as Data Access layer and SQL
I'm creating a website that generates a text file. I would like for the
Creating a default ASP.NET MVC project in Visual Studio sets up a basic project

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.