BOM header

TDM adds BOM header to generated files.
It is not major issue to me, but I would like to see option to not add those few bytes at file beginning.

best regards

Hi,

click Settings | Options and navigate to section Model | Physical model. On tab General you can change Encoding Used for SQL Scripts from UTF-8 to ANSI.

Regards,

Vaclav

I think it’s not what I want.
I want to stay with utf8 encoding, but get files without BOM header.

Hi Michal,

what is the reason for removing BOM from UTF-8 encoded files, please?
As far as I know it can be there and one of good advantages is that other software products can recognize encoding correctly.

I know some people work with obsolete software products that don’t work with UTF-8 encoded files correctly, but in this case outputs in ANSI should solve their problems. That’s why I recommended to change settings to ANSI.

I look forward to your reply,

Vaclav

You are right with reasons of using BOM header.
But unfortunately not all software is ready to work with this (still). And it’s true not only for obsolete ones. NetBeans, php5 - they do not support it. Probably MySQL also doesn’t support it (didn’t tested, only checked out Internet quickly)

BOM header is optional, especially in case of UTF8 which is byte order independent.

I’m not saying to drop this header out. But to have it optional would be helpful.

with regards

PS. ANSI is not as good as utf8 in multilingual environments. I’m sure you know it :wink:

Hi Michal,

thank you for sending me details. I created new change request: CR#93783. I did some research and found out that there are areas where UTF-8 files with BOM might be a problem.

BTW: I found the following:
http://netbeans.org/bugzilla/show_bug.cgi?id=161015
It looks like it has low priority.

If you work with SQL files in PHP projects you may find a workaround here:
http://php.net/manual/en/function.fopen.php
There is example that skips BOM (not tested)

Thank you for your feedback,

Vaclav

Hi Michal,

BETA version 4.2.3.6 allows you to generate outputs without BOM.

Regards,

Vaclav