You are not logged in.
Sorry, I don’t quite get it. I didn’t have Notepad so I just installed it, but how do I save a file as ANSI? Do I choose Format and check Encode in ANSI? Do I also have to check UTF-8 without BOM?
Never mind, I did it (without checking UTF-8 without BOM) and the BOM is gone!
Thanks for your trouble Ruud! Just curious: how on earth do you find and see that BOM? I never saw anything…
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.
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)
Kladblok??? I hate that ;) That doesn’t have all those options. What I just installed is Notepad++.
Edit: (crossposting all the time…)
For Linux users,
Ah, learned something again. I should spend more time with my Linux laptop in stead of this Windows thing… ;)
Last edited by Els (2007-05-24 22:08:04)
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)
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 …
The BOM problem should have been fixed. So you’d better post this in the plugin thread.
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?