html and utf-8 / utf-8 no bom problem

27 views
Skip to first unread message

stratboy

unread,
Nov 19, 2009, 10:30:25 AM11/19/09
to BBEdit Talk
Hi, why doesn't the html character set tool let me use only utf-8 no
bom??? (bbedit v9.3). This is quite a big problem to me.. I can set
the utf-8 encoding on the bottom of the window, but if I try to save
my html doc, a warning message appears telling me that I'm trying to
save in utf-8 but the doc contains utf-8 no bom data so it's
dangerous...

Help please..

Bye!

Rich Siegel

unread,
Nov 19, 2009, 11:23:02 AM11/19/09
to bbe...@googlegroups.com
On 11/19/09 at 10:30 AM, em...@reghellin.com (stratboy) wrote:

>Hi, why doesn't the html character set tool let me use only utf-8 no
>bom??? (bbedit v9.3).

It in fact does. The "utf-8" specification is UTF-8, No BOM. Use
that in your declaration, and make sure the encoding popup says
"no BOM" and you're doing the right thing.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they
sedate me.

stratboy

unread,
Nov 23, 2009, 4:32:22 AM11/23/09
to BBEdit Talk
Mmm no, there must be something wrong, because with the previous
version of bbedit I didn't have any problem. Also, bottom left I've
got a menu that let me select simple utf-8. In don't want no-bom since
it's problematic with entities. The message I get when I try to save
an utf-8 doc is like this:

'this document contains data which describes its encoding as unicode
(untf-8 no bom), but the encoding has been set to unicode utf-8.
saving this document as-is will likely cause unexpected display of its
contents and.... [...] '

Johan Solve

unread,
Nov 23, 2009, 4:40:12 AM11/23/09
to bbe...@googlegroups.com
You're not alone. Some of us must use BOM.

See this discussion:

http://groups.google.com/group/bbedit/browse_frm/thread/87e2aecabcf219f3
--
Johan Sölve [FSA Member, Lasso Partner]
Web Application/Lasso/FileMaker Developer
MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se mailto:jo...@montania.se
(spam-safe email address, replace '-' with 'a')

BeeRich

unread,
Nov 23, 2009, 10:58:12 PM11/23/09
to BBEdit Talk
On Nov 19, 11:23 am, Rich Siegel <sie...@barebones.com> wrote:
> On 11/19/09 at 10:30 AM, em...@reghellin.com (stratboy) wrote:
>
> >Hi, why doesn't the html character set tool let me use only utf-8 no
> >bom??? (bbedit v9.3).
>
> It in fact does. The "utf-8" specification is UTF-8, No BOM. Use
> that in your declaration, and make sure the encoding popup says
> "no BOM" and you're doing the right thing.

That warning should happen once for a single file, not every time I
wish to save though. Babysitting developers once is one thing, doing
it over and over again will produce trojans.

Patrick Woolsey

unread,
Nov 24, 2009, 9:55:04 AM11/24/09
to bbe...@googlegroups.com
Re this matter, for those who may have missed it last week :-), please try
the BBEdit 9.3.1 seed:

<http://groups.google.com/group/bbedit/msg/84185b28380f0574>



Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com>
P.O. Box 1048, Bedford, MA 01730-1048

Rich Siegel

unread,
Nov 24, 2009, 11:14:43 AM11/24/09
to bbe...@googlegroups.com
On 11/23/09 at 4:32 AM, em...@reghellin.com (stratboy) wrote:

>Mmm no, there must be something wrong, because with the previous
>version of bbedit I didn't have any problem. Also, bottom left I've
>got a menu that let me select simple utf-8. In don't want no-bom since
>it's problematic with entities.

You still have it backwards. Trust me: select "Unicode (UTF-8,
no BOM)" from the encoding menu.

Maarten Sneep

unread,
Nov 24, 2009, 11:25:41 AM11/24/09
to bbe...@googlegroups.com
On Tue, 24 Nov 2009 11:14:43 -0500, Rich Siegel <sie...@barebones.com>
wrote:
> On 11/23/09 at 4:32 AM, em...@reghellin.com (stratboy) wrote:
>
>>Mmm no, there must be something wrong, because with the previous
>>version of bbedit I didn't have any problem. Also, bottom left I've
>>got a menu that let me select simple utf-8. In don't want no-bom since
>>it's problematic with entities.
>
> You still have it backwards. Trust me: select "Unicode (UTF-8,
> no BOM)" from the encoding menu.

Is there is fact a valid reason to use unicode files with a byte order
marker?

I think your UI change, renaming the two options as
"Unicode (UTF-8)" and "Unicode (UTF-8 with BOM)" is a good compromise.

Best,

Maarten

Rich Siegel

unread,
Nov 24, 2009, 11:57:12 AM11/24/09
to bbe...@googlegroups.com
On 11/24/09 at 11:25 AM, maarte...@xs4all.nl (Maarten Sneep) wrote:

>Is there is fact a valid reason to use unicode files with a byte order
>marker?

There are several I can think of. :-) The biggest one is that
writing a byte-order mark will unambiguously identify the
encoding of the file, without requiring any parsing or decoding
of its contents.

However, lots of software can't deal with a Unicode BOM, even in
this day and age, so for some applications the BOM causes more
problems than it solves.

Johan Solve

unread,
Nov 24, 2009, 4:12:18 PM11/24/09
to bbe...@googlegroups.com
Sorry for beating that pony. The lack of affirmation was deceptive.
>--
>You received this message because you are subscribed to the
>"BBEdit Talk" discussion group on Google Groups.
>To post to this group, send email to bbe...@googlegroups.com
>To unsubscribe from this group, send email to
>bbedit+un...@googlegroups.com
>For more options, visit this group at
>http://groups.google.com/group/bbedit?hl=en
>If you have a feature request or would like to report a problem,
>please email "sup...@barebones.com" rather than posting to the group.

G. T. Stresen-Reuter

unread,
Nov 25, 2009, 1:48:23 AM11/25/09
to bbe...@googlegroups.com
On Nov 24, 2009, at 4:14 PM, Rich Siegel wrote:

>> In don't want no-bom since
>> it's problematic with entities.
>
> You still have it backwards. Trust me: select "Unicode (UTF-8,
> no BOM)" from the encoding menu.

Rich is right. utf-8, no BOM shouldn't have any issues with entities.
I'll bet the entity issue you are experiencing is because:

1. the web server is sending the wrong charset (something other than
utf-8)
2. the data with entities comes from a database that stores the data
in something other than utf-8
3. the content-type in the HTTP-equiv META element states the charset
is something other than utf-8

Just my 2¢

Ted

stratboy

unread,
Nov 25, 2009, 3:32:52 AM11/25/09
to BBEdit Talk
Should be all right, but ok, I'll re-try
Thanks

G. T. Stresen-Reuter

unread,
Nov 25, 2009, 4:26:38 AM11/25/09
to bbe...@googlegroups.com
On Nov 25, 2009, at 8:32 AM, stratboy wrote:

> Should be all right, but ok, I'll re-try
> Thanks
>
>> 1. the web server is sending the wrong charset (something other than
>> utf-8)
>

Note that this will be in the HTTP header. You might need a special
tool to see what's being sent in the HTTP header. Safari has some
great tools for viewing such data.

Good luck.

Ted

Carlton Gibson

unread,
Nov 25, 2009, 5:34:25 AM11/25/09
to bbe...@googlegroups.com
HTTP Client is pretty cool too:

Reply all
Reply to author
Forward
0 new messages