Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Byte-Order Mark
In Dutch: kladblok (should be installed by default in Windows)
Yes, choose the format ‘Ansi’. If “UTF-8 without BOM” is also a option you can check, that would be even better, although for this file it probably won’t matter.
Offline
Re: Byte-Order Mark
Using a hexdump utility, you can easily find these things.
For Linux users, run this in the directory that contains the files you want to check (it matches images as well, but this is mostly to quickly find candidates that have a BOM, although it doesn’t work on files/dirs with spaces (should’ve used xargs)):
for i in `find . -type f|grep -v .svn`; do od -x $i |grep 'bbef' > /dev/null && echo $i; done
I confirmed this by viewing the file with ‘less’ (it shows “<EF><BB><BF>” at the beginning of the file). It probably helps that I have my locale set to POSIX or some single-byte charset (haven’t switched to UTF-8 yet), otherwise i’d have to use ‘hexdump’ to confirm it (the hexdump would have shown: “bbef 3cbf” as the first hex chars).
Last edited by ruud (2007-05-24 22:13:47)
Offline
#15 2007-05-24 22:03:45
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Byte-Order Mark
Kladblok??? I hate that ;) That doesn’t have all those options. What I just installed is Notepad++.
Edit: (crossposting all the time…)
ruud wrote:
For Linux users,
Ah, learned something again. I should spend more time with my Linux laptop in stead of this Windows thing… ;)
Thanks again!
Last edited by els (2007-05-24 22:08:04)
Offline
#16 2007-11-12 08:47:08
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Byte-Order Mark
ruud
thanks for tracking this one down in the MLP. Your script example will come in handy too for checking files before packaging up future builds.
Do you happen to know the unix command line way of truncating the BOM from such files?
Edit: Think I just worked out a way to do it using “dd ibs=1 skip=3”. Anyway, will play with that and see what happens.
Edit2: Yes, dd if=l10n_base.php of=new_l10n_base.php bs=1 skip=3 does the job just fine.
Last edited by net-carver (2007-11-12 09:01:27)
— Steve
Offline
#17 2007-12-26 22:12:05
- beatfreak
- New Member
- Registered: 2006-03-02
- Posts: 8
Re: Byte-Order Mark
I have the Byte-Order Mark bug with the latest version of the pack (0.7.650).
I think the bug might be somewhere in the gbp_admin_library plugin.
When the gbp_admin_library plugin is inactive, I get an error-message at the first line of my document with the doctype on the second line.
When I activate the plugin, I get an empty line first before the doctype and my xhtml page renders invalid: Byte-Order Mark found …
Offline
#18 2007-12-26 23:55:12
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Byte-Order Mark
The BOM problem should have been fixed. So you’d better post this in the plugin thread.
Offline
#19 2007-12-27 00:19:05
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Byte-Order Mark
beatfreak
thanks, I’ll look into it.
— Steve
Offline
#20 2007-12-27 01:20:13
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Byte-Order Mark
beatfreak
I’ve gone trough the source code and the files included in that version of the pack and I can’t detect any BOM there. There are some older versions of the plugin in the svn repository which do have a BOM in them — but they aren’t included in that build of the MLP Pack.
Are you using the latest gbp_admin_library?
— Steve
Offline
#21 2007-12-27 09:12:45
- beatfreak
- New Member
- Registered: 2006-03-02
- Posts: 8
Re: Byte-Order Mark
I am using version 0.4.632 of gbp_admin_library.
I also did not find a BOM in any of the files.
EDIT: I have deleted the plugin files and installed them again and I also updated all my templates. Problem seems to be fixed.
However there is still a blank line before my doctype but it is not causing any validation errors.
Last edited by beatfreak (2007-12-27 10:49:22)
Offline
#22 2007-12-27 10:46:32
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Byte-Order Mark
beatfreak
One thought, this is the first build that uses compressed plugins so can you grab the previous version of the pack from here (v0.7.363) and only install the uncompressed gbp_admin_library plugin from that (it’s the same version as you’re trying to run with now.)
Many thanks in advance!
Edit: — Please post any follow-up to the MLP Pack’s thread.
Last edited by net-carver (2007-12-27 10:47:59)
— Steve
Offline