Jump to content

utf-8 BOM problem


lecrackffm
 Share

Recommended Posts

Hey all,

i do, most probably have a problem with file encoding and / or BOM. 

My <head>  content is getting moved into <body> and i can inspect a couple of &#65279;  ( ZERO WIDTH NO-BREAK SPACE) chars with dev tools.

I checked all template files with phpstorm, they are all in utf-8 w/o BOM.

The current installation is based on a profile i exported from another project where i had not such problems.

However, in the new project i did change the default language to german and installed english as the second language. 

Might there be any conflicts with the language support modules?

Hints, tips or solutions are highly appreciated ?

Link to comment
Share on other sites

22 minutes ago, lecrackffm said:

I checked all template files with phpstorm, they are all in utf-8 w/o BOM.

I remember to had this same issue with PhpStorm. Open templates with Notepad, unwanted char (��) will appear or use SublimeText 3 with encoding UTF-8 without BOM.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

@flydev thanks.

i reopend all files with Sublimetext 3.. found nothing.

Then i  begun to open all files with VSC.. and there i finally found ��������  behind the <html> tag.

I have no clue how they ended up there nor what funky encoding they are, but deleting them finally solved my problem.

  • Like 2
Link to comment
Share on other sites

Yes, invisible format characters can mess up your website and drive you nuts because you can't trace the cause in a logical way. Coding with the right editor is crucial. For example the bluefish editor does not reveal invisible format characters but notepad++ does !!

Link to comment
Share on other sites

15 hours ago, pwired said:

Yes, invisible format characters can mess up your website and drive you nuts because you can't trace the cause in a logical way. Coding with the right editor is crucial. For example the bluefish editor does not reveal invisible format characters but notepad++ does !!

yep, took me about three hours from tracing to solution..

i thought an IDE like phpstorm would be at least sophisticated enough to inform me about these little suckers.. ?

Lesson learned anyways. Nice weekend to everyone!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...