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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:34:13+00:00 2026-06-04T12:34:13+00:00

I want to port our application (which works on Windows, Linux, Solaris, AIX, etc.),

  • 0

I want to port our application (which works on Windows, Linux, Solaris, AIX, etc.), but I have a lot of problem with locale. This code works on all platforms, except OSX:

#define SIZE 1000

int main(int argc, const char * argv[])
{    
    char dest[SIZE];
    wchar_t *dptr = L"árvíztűrőtükörfúrógép";
    size_t count = SIZE;
    size_t length;

    setlocale(LC_CTYPE, "");

    length = wcstombs(dest, dptr, count);
    printf("%d characters were converted.\n", length);
    printf("The converted string is \"%s\"\n\n", dest);
}

Please, help me guys, to print that text in terminal in ISO-8859-2 encoding!

Thanks a lot!

  • 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-04T12:34:15+00:00Added an answer on June 4, 2026 at 12:34 pm

    Apple Macintosh uses neither ISO 8859-1 nor ISO 8859-2 encoding. Instead, Apple uses proprietary code tables, namely MacRoman for West European and MacCentralEuropean for East European Languages. WWW browsers on Macintosh (Netscape Navigator 2 and above, and Microsoft Internet Explorer 2.1) automatically perform the recoding from ISO 8859 encoding used on Internet to Macintosh native character set.

    Taken from here: http://nl.ijs.si/gnusl/cee/iso8859-2.html

    Here’s what you need: http://en.wikipedia.org/wiki/Mac_OS_Roman

    And here’s the UTF-8 <-> MacRoman conversion code: http://alienryderflex.com/utf-8/

    There are only the modifiers for “u” and “o” (inserted after these letters) to get the “ő” and “ű” characters.

    See the table here http://www.alanwood.net/demos/macroman.html

    “˝”, Code=0xFD, U+02DD, “double acute accent”, Spacing Modifier Letters

    (“Think different” in action)

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

Sidebar

Related Questions

I have built a windows C++ application that I'd like to port to linux.
I want to port this SQL query, which works just fine on SQL Server,
i want to port my application to CodeIgniter but i am wondering whether i
i want to configure tomcat 7 to use port 80 on windows 7, but
I want to develop and port some of our windows phone 7 games to
I want to port the server component of our application, written in Visual Studio
I have an existing multi-threaded application which uses blocking connect() call. However, I want
I have a some doubles that I want to port into NSDecimalNumber, because I'm
I have a date picker library written for MooTools that I want to port
I want to check which port is used, when the port is not explicitly

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.