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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:15:06+00:00 2026-06-01T15:15:06+00:00

I am using OSTranslate to convert my mail body content to Unicode String. Which

  • 0

I am using OSTranslate to convert my mail body content to Unicode String. Which is working fine for char* less then WORD size 65535.

WORD Length = MAXWORD;
actualOutLength = OSTranslate(OS_TRANSLATE_LMBCS_TO_UNICODE, (char*)inPtr,
Length, (char*)outPtr, Length);

After conversion the output array contains only a part of a source string.

Please Suggest what is the correct approach to set the size as my input string size is exceeding MAXWORD size limit.

  • 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-01T15:15:07+00:00Added an answer on June 1, 2026 at 3:15 pm

    One way I’ve come up with is that if (MAXWORD-actualOutLength<4) then take the output buffer and do the reverse translate using OS_TRANSLATE_UNICODE_TO_LMBCS. You will throw away this result — but the length returned is the length of the portion of your original input buffer that was processed. So you can use that length to advance your inPtr, call OSTranslate again with OS_TRANSLATE_LMBCS_TO_UNICODE again and continue building your extended output buffer in a loop until you exhaust your input buffer. Note that this would only work if your input string is LMBCS optimized for Group 1. If it was optimized for a different group, the reverse translation length will probably not align with the characters in your input buffer.

    Another way would be to use NLS_get in a loop to count out characters in the input buffer up to MAXWORD/2. You can then use either NLS_translate or OSTranslate on a the first part of the input buffer and be sure that the output will fit within MAXWORD. Then start counting again from the last pointer you received back from NLS_get, and continue in a loop until you have run through the entire input buffer.

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

Sidebar

Related Questions

Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using the HTML5 File API I can get the Binary String representation of a
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using of mobile dialog authentication is working well for other mobile devices except on
Using delphi 2010, i am wondering if there someway to escape the following string
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.

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.