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

  • Home
  • SEARCH
  • 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 9317785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:57:47+00:00 2026-06-19T02:57:47+00:00

When reading the IPTC data from an image, UTF-8 accented characters are not displaying

  • 0

When reading the IPTC data from an image, UTF-8 accented characters are not displaying properly when reading them via PHP.

For example: é, ø and ü

With a header content-type set as UTF8, instead of the character, I get the question mark in a black diamond. � If no content-type is set, then I get a dash character: —

The following is the code being used to read the IPTC block:

$file = '/path/to/image.jpg';
getimagesize($file, $info);
$iptc = iptcparse($info['APP13']);

I have also tried uploading the exact same image to a WordPress installation on the same server, and it properly strips the accented character and replaces it with it’s basic latin equivalent. I don’t mind if this is the end result, I would just like to read the characters properly.

Any ideas on how to get the complete and correct data from the image?

  • 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-19T02:57:48+00:00Added an answer on June 19, 2026 at 2:57 am

    Answering a bit late, but since I had the same problem displaying special characters as č š ž (which appear in Slovenian alphabet) I may aswell answer for future reference.

    Solution to this problem actually is not related to php, but to the IPTC data encoding. By default most software that can write IPTC data will store it in plain ASCII. At first I’ve used Adobe Bridge – which actually displays all special characters as it should when you start tagging your images – but once you want to parse that data in PHP you will actually not see special characters. (I would have to check again this part, but the main catch is that two different encodings happen – one that encodes IPTC data on the image and one that displays that data in a program that can handle IPTC data – or something along this lines).

    To solve the problem I used a program called ExifTool which is an amazing piece of software and will let you manage almost any data on your image.

    Than I used it to convert all IPTC encodings to UTF-8 – and from then on I just had to retag images that had corrupt characters (which Adobe Bridge correctly displays but obviously does not save in correct encoding).

    The command to accomplish this on all images in a folder is:

    exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8
    

    You may also want to download ExifTool GUI if you are not familiar working from cmd.

    I haven’t found any better program that could accomplish this same task faster.

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

Sidebar

Related Questions

Reading about F# today and I'm not clear on one thing: From: http://msdn.microsoft.com/en-us/library/dd233200.aspx you
PHP has built in support for reading EXIF and IPTC metadata, but I can't
//Reading data from property file : String username = prop.getProperty(username); String password = prop.getProperty(password);
Reading the docs, I'd expect $(#wrap2).remove(.error) to remove all .error elements from #wrap2 .
Reading the Scala by Example book and there is this example when Martin explains
Reading through some of the answers to similar questions, I'm still not clear on
Reading an earlier question I asked about restricting developers from delivering to a stream
Reading through wikipedia I came across the concept of Sprints in Agile development. From
Reading Real world Haskell i found some intresting question about data types: This pattern
Reading from the googleVis package vignette : With the googleVis package users can create

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.