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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:52:34+00:00 2026-05-12T21:52:34+00:00

I am enhancing a piece of software that implements a simple ASCII based protocol.

  • 0

I am enhancing a piece of software that implements a simple ASCII based protocol.

The protocol is simple… here is an example of what the messages look a little bit like (not the same though, I can’t show you the real protocol):

AUTH 1 1 200<CR><LF>

To which we get a response looking similar to

230 DEVICE 1 STATE AUTH 200 OUTPUT 1 NAME "Photo Black"<CR><LF>

The name “Photo Black” comes from a database sqlite database. I need to enhance it to support foreign languages. So I’ve been thinking that the field “Photo Black” needs to be “optionally” encoded as a UTF-8 string between the quotes. I’m wondering if there is a standard for this so that the client application can interpret the string in the quotes and straight away recognize it as either UTF-8 or plain ASCII. I’m not willing to rewrite the protocol, that would be too much work. Just slip in some kind of encoding for clients to recognize some Spanish or Swedish names.

I don’t want the field to be always interpreted as UTF-8 either, long story there. You know how in C++ I can type 0xFF and the compiler knows that this is a hex string… is there an equivalent for UTF-8? Sorry I may be jumping the gun but I’m not that familiar with UTF-8 encoding and internationalization in general.

  • 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-12T21:52:34+00:00Added an answer on May 12, 2026 at 9:52 pm

    Do you have control over both the server and the client? If not, you can’t change the protocol so you won’t be able to do it. When you say you’re “not wiling to rewrite the protocol” – you’re going to have to do so at least to some extent. Whatever you do, you will be changing the protocol.

    I’m not sure why you wouldn’t want to always interpret the data as UTF-8 either – if it’s currently only ASCII, then it would be completely backward compatible to always interpret it as UTF-8, as all ASCII is encoded the same way in UTF-8. Perhaps if you could give more information, we could provide more help.

    You could introduce a prefix for UTF-8-encoded strings, e.g. U:

    230 DEVICE 1 STATE AUTH 200 OUTPUT 1 NAME U"Photo UTF-8 stuff here Black"<CR><LF>
    

    would that help?

    Do you actually have an 8-bit data path? If something is going to mangle the top bit of every byte, then you’ll need to consider options like Punycode instead of UTF-8.

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

Sidebar

Related Questions

I'm enhancing an open source control to add some functionality that I need, and
We are currently enhancing an ASP.NET app that performs quotes on a number of
I am enhancing a tool. Please note that this tool will be linked to
Currently I'm working on enhancing a project that has been developed by an external
I hate writing code that makes my software more solid. This is something the
I am enhancing an existing JSF app. There I need to add ExtGWT component
I want to debug TCP/IP interactions for a program I'm enhancing. I don't have
Possible Duplicate: enhancing a program - complete failure im asked to write a program
I'm in the process of porting, enhancing, and D-atizing our reign SDK from C#
I am getting an error that I cannot figure out: ActionView::MissingTemplate (Missing template cluster/delete_stuff.erb

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.