1

I have just downloaded a large xml file and most of characters appear as "�". I changed the encoding but there was no improvement. Anyone knows what this might be due to?

One fishy thing: the file does not start as a usual xml, but rather as: "� m�Y �/opt/cds-invenio/var/www/dumps/.HepNames-records.xml"

The administrator give me a tip: "clearly it's Content-Type: application/x-gzip", which I did not understand.

Thanks for the support.

closed as off-topic by Colin 't Hart, Mikael Eriksson, Marco, John aka hot2use, McNets Sep 4 '17 at 9:58

If this question can be reworded to fit the rules in the help center, please edit the question.

  • How is this related to database administration? Are you storing that into a database and losing the encoding? If yes, which DBMS product are you using? How are you reading and storing those file? Which programming language do you use for that? If not, then the question is off-topic here – a_horse_with_no_name Sep 4 '17 at 6:55
  • 4
    I'm voting to close this question as off-topic because this is not a question about database administration but about file content encoding. – Colin 't Hart Sep 4 '17 at 7:27
0

Sounds like the file you downloaded is actually not an XML file yet. It is actually a compressed XML file, and was probably compressed using the GZip algorithm.

To see your data you will have to decompress it:

  • rename the file to an .xml.gz extension (if it doesn't have one already)
  • use any decompression program to decompress your XML data (7zip is good/free)
  • open the resulting XML file in your favourite text editor!
  • Hey, thanks for the reply. I did decompress it with gzip and opened it and that's when all the � characters show up. – bugo99iot Sep 3 '17 at 22:36
  • Ah, that's weird. The only other guess I have is that the XML data might be encrypted? (since you've already tried encoding tricks) You could also open the file in a Hex editor and check its Magic Number... – Oreo Sep 4 '17 at 8:26
  • Hi. I managed to sort out the issue. Downloading the file from Firefox caused an error. By decompressing what I got from there I obtained a .xml exactly the same size as its parent .xml.gz I tried now to download the file from Chrome and all went well. Thanks again. – bugo99iot Sep 6 '17 at 8:13
  • Thanks for the info! You should add your above comment as an Answer to this Question and mark it as such, by using the tick mark under the Downvote button. – Oreo Sep 6 '17 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.