You are here: PSPad forum > English discussion forum > Re: Info page code

Re: Info page code

#1 Info page code

Posted by: FearTheBeard | Date: 03/08/2017 15:52 | IP: IP Logged

Hello everybody,
I'm not expert in programming, but I need help for solving this little issue.

I have two different xml file, I don't know why this two files are exactly equal and both start with the same Declaration, but the first one have a page code: UTF-8 and the second one have the page code: ANSI.

I try to check in HEX editor and it's clear... why this difference? and how is possible with the same declaration?

thanks a lot

Declaration:
imgur.com

UTF-8 XML:
imgur.com

imgur.com

ANSI XML:
imgur.com

imgur.com

Edited 1 time(s). Last edit at 03/08/2017 16:33 by pspad.

Options: Reply | Quote | Up ^


#2 Re: Info page code

Posted by: pspad | Date: 03/08/2017 16:35 | IP: IP Logged

UTF-8 file contains BOM (begin order mark) on the begin of file.

UTF-8 encodes only chars with upper character table part. It means if you don't have characters with diacritic signs in your file, content of UTF-8 and ANSI will be same.

Options: Reply | Quote | Up ^


#3 Re: Info page code

Posted by: Andreas | Date: 03/08/2017 17:14 | IP: IP Logged

BOM => "Byte order mark" en.wikipedia.org

In PHP e.g. you can not work with BOM files. There actually are so called "BOM checker classes" to examine files and make clear they have no BOM. You can not see the BOM when you open it with a text editor.

So if you work with PHP or not explicit need a BOM then always save your files without the BOM.

Edited 1 time(s). Last edit at 03/08/2017 17:15 by Andreas.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2017 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák