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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:05:40+00:00 2026-05-21T14:05:40+00:00

This has been bugging me for ages and I want to get to the

  • 0

This has been bugging me for ages and I want to get to the bottom of this once and for all. I have an associative array which fields I have defined using ISO-8859-1 characters. For instance:

array("utført" => "red");

I also have another array that I have loaded in from a file. I have printed this array out in a browser, checking that values like Æ, Ø and Å is intact. I try to compare two fields from these arrays and I’m slapped by the message:

Undefined index: utfã¸rt on line 39

I can’t help but sob. Every single damn time I involve any letters outside UTF-8 in a script they are at some point converted into ã¸r or similar nonsense.

My script file is encoded in ISO-8859-1, the document from which I’m loading my data is the same, and so is the MySQL table I’m trying to save the data to.

So the only conclusion I can draw is that PHP isn’t accepting just any character-sets into it’s code, and I have to somehow force PHP to speak Norwegian.

Thanks for any suggestions

Just FYI, I won’t accept any answers in the lines of “Just don’t use those characters” or “Just replace those characters with UTF equivalents at file load” or any other hack solutions

  • 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-21T14:05:40+00:00Added an answer on May 21, 2026 at 2:05 pm

    When you read your data from external file try to convert them in proper encoding.

    Something like this I have on my mind…

      $f = file_get_contents('externaldata.txt');
      $f = mb_convert_encoding($f, 'iso-8859-1');
      // from this point deal with $f whatever you want
    

    Also, look at mb_convert_encoding() manual for more info.

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

Sidebar

Related Questions

This has been bugging me for quite some time now. All I want to
I have a strange issue which has been bugging me all day. On the
This has been bugging me lately. Say I have a base class Base. If
This problem has been bugging me for a while. I have to load a
This has been bugging me for a while and have yet to find an
Ok guys this problem has been bugging me all day and I cant seem
This has been bugging me for a while. I have this ircbot that I
This has been bugging me for 2 days now and I cant get my
This has been bugging me for a few days now. I have written a
Good day to all of you... This has been bugging me for quite a

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.