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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:14:26+00:00 2026-05-31T21:14:26+00:00

So I have been doing some research into getting my UTF8 to print correctly.

  • 0

So I have been doing some research into getting my UTF8 to print correctly. And I found a good example of my problem here:
UTF8 Encoding problem – With good examples‘

So I setup the test myself but with this result: (PHP)

echo "<meta http-equiv="Content-Type" content="text/html;charset=utf-8">";
mb_internal_encoding("UTF-8");
mb_http_output("UTF-8");
mb_http_input("UTF-8");

$textEnc = _POST["text"];
$text = cc_decode($textEnc);
echo 'Original : ', $text."<br />";
$enc = mb_detect_encoding($text, "UTF-8,ISO-8859-1");

echo 'Detected encoding '.$enc."<br />";

echo 'Fixed result: '.iconv($enc, "UTF-8", $text)."<br />";

Result: (Result HTML)

Original : ひ
Detected encoding UTF-8
Fixed result: ひ

I was expecting a japanese character ひ

The code I am using to create the request looks like: (Obj C)

NSString* cCode = B64EncodeString([NSString stringWithFormat:@"%s",data->Text()]);
NSString* connectURL = [NSString stringWithFormat:@"%@%@", SERVER_ADDRESS, @"users/test.php"];

NSString* mPostArgs = [NSString stringWithFormat:@"text=%@", cCode];

NSMutableURLRequest* theRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]
                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                         timeoutInterval:mTimeoutInSeconds];
[theRequest setValue:@"application/x-www-form-urlencoded; charset=UTF-8" forHTTPHeaderField:@"content-type"];
[theRequest setValue:@"UTF-8" forHTTPHeaderField:@"accept-charset"];

if(mPostArgs != nil) {

    NSData* myRequestData = [NSData dataWithBytes: [mPostArgs UTF8String] length: [mPostArgs length]];
    [theRequest setHTTPMethod: @"POST"];
    [theRequest setHTTPBody: myRequestData];
}

// create the connection with the request
// and start loading the data
NSURLConnection* theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
  • 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-31T21:14:27+00:00Added an answer on May 31, 2026 at 9:14 pm
    NSString* cCode = B64EncodeString([NSString stringWithFormat:@"%s",data->Text()]);
    

    took the string incorrectly, I changed it to not re-create the NSString

    NSString* cCode = B64EncodeRaw((const uint8_t*)data->Text(), strlen(data->Text()));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have been doing some research into physically isolating the secure and non-secure sections
I've been doing some research into finally automating our Development builds and still have
This is a homework problem that I have. I have been doing some research
I have been doing some research about this and have found a few similar
Lately, I have been doing some research into cryptography. To get a better understanding
I have been doing some research on test driven development and find it pretty
I have been doing some research and this seems to be not possible unless
I have been doing some research on the correct procedure to follow when working
I have been doing some research on mobile websites, and thus far it seems
I have been doing some research lately about best approaches to authenticating web services

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.