Add support for UTF-8 without BOM

Code Writer App Suggestions and Support Forum

Posted 10 years ago by Benjamin GILLET
Avatar

When creating new raw php files, they are saved in UTF8 with BOM format.

This generates errors when coding in PHP5 using namespaces because additional invisible characters are considered by PHP as before namespace declaration. So we have to create files in another editor to make the UTF8 WITHOUT BOM and then edit them with AUTOMATIC enconding detection under Code Writer.

Comments (5)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, we currently pull in the default UTF-8 encoding for code page 65001, which seems to include BOM.  Are you asking for another item in the Character Encoding dropdown of our Editor settings flyout that would effectively be "Unicode (UTF-8 without signature)"?

Do you know if there is an official code page for that or does it still fall under 65001?


Actipro Software Support

Posted 10 years ago by Benjamin GILLET
Avatar

UTF-8 without BOM doesn't have a specific code page.

In fact, it is a way constructing the file.

See this URL which gives you a good explanation of the difference : http://stackoverflow.com/questions/2223882/whats-different-between-utf-8-and-utf-8-without-bom

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Thanks, we are adding a character encoding option for "Unicode (UTF-8 without signature)" to the next version.


Actipro Software Support

Posted 10 years ago by Benjamin GILLET
Avatar

I have noticed you added support to UTF8 without BOM files in the new version. It is great. Thanks a lot.

I just have one question about the 'Automatic (with fallback to UTF8)'. Does it fallback to UTF8 without BOM or with BOM ?

I am asking you this question because I think it should fallback to UTF8 without BOM as long as it is recommanded not using UTF8 with BOM but title is not clear about what format is used.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, it will fall back to UTF8 with BOM since that is the default for Windows.  We had to add a special case for the "UTF8 without BOM" option.  The automatic option is something built into WinRT though.


Actipro Software Support

The latest build of this product (v4.2.42) was released 3 years ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.