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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:10:00+00:00 2026-06-16T18:10:00+00:00

I’m trying to read a file but I can’t figure out the character encoding.

  • 0

I’m trying to read a file but I can’t figure out the character encoding. There are two characters in the file that I know the value of, and the hex value that I see in my hex editor is as follows:

0xCCA9  é
0xCCBB  ê
0xCCC1  á

Any ideas what encoding this is?

All english characters are ASCII encoded in the file. I had similar files which were encoded in mac central europe if that’s any use, perhaps they have been accidentally encoded more than once.

Edit:

Code to find mappings in Python 2.7: (See Esailija’s answer above).

find_mappings(...) is a generator which is given a dictionary of character mappings. It iterates through all available character sets and yields those which match the criteria.

import pkgutil
import encodings

def get_encodings():
    false_positives = set(["aliases"])
    found = set(name for imp, name, ispkg in pkgutil.iter_modules(encodings.__path__) if not ispkg)
    found.difference_update(false_positives)
    return found

def find_mappings(maps):
    encodings = sorted(get_encodings())
    for f in encodings:
        for g in encodings:
            try:
                if all([k.decode(f).encode(g) == v for k,v in maps.items()]):
                    yield (f,g)
            except:
                # Couldn't encode/decode
                pass

for mapping in find_mappings({'\xCC': '\xC3', '\xBB': '\xAA', '\xA9': '\xA9', '\xC1': '\xA1'}):
    print(mapping)
  • 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-16T18:10:01+00:00Added an answer on June 16, 2026 at 6:10 pm

    It’s not in any encoding but a result of messy encoding conversions. How it would be in UTF-8:

    0xC3A9  é
    0xC3AA  ê
    0xC3A1  á
    

    So what I think originally happened was that UTF-8 data was treated in ASCII compatible code page X, and then the result was encoded to the file in Mac Central Europe.

    To get the original data, you would interpret the file in Mac Central Europe, re-encode the result in code page X, and interpret the re-encoded result in UTF-8.

    I don’t know what the code page X is but it must have the following properties, given that the above is true:

    • Encodes © as 0xA9; same as Mac, Windows and ISO encodings
    • Encodes Ő as 0xC3; rules out any DOS code pages
    • Encodes Ľ as 0xAA
    • Encodes Ń as 0xA1
    • Is ASCII compatibe; rules out any EBCDIC code pages
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there's a lot of other questions out there that deal with this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

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.