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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By MarkE
      I have a selector:
      $pageArray = $pages->find("template=basic-page, length.magnitude>0, include=all"); I would like an array of each of the 'length' fields. However, the field is an object and $pageArray->each('length') returns the formatted values; I want the unformatted objects.
      I thought perhaps I could use a callable like:
      $pageArray = $pages->find("template=basic-page, length.magnitude>0, include=all"); $lengths = $pageArray->each(function($p) { $length = $p->getUnformatted('length'); return $length; }); but it seems that only strings can be returned and those are concatenated.
      So it looks like I have to use a foreach() loop - which works, but I was expecting some neater shorthand. Any thoughts?
    • By Webrocker
      Hi,
      I updated to the currently latest master (3.0.184) and now a lister (listerPro 1.1.3) preset shows the info cited in the title.
      According to this closed issue this is supposed to work <del>in 3.0.184</del>
      https://github.com/processwire/processwire-issues/issues/1428

      or is this a lister(pro) issue?

    • By sebr
      Hi
      I'm using Processwire 3.0.180.
      When I edit a page in admin, Tracy Debugger count between 50 and 100 pages loaded, depending on the templates. All pages open in less than a second.
      But when I edited pages from a certain template, this pages opened in more than 40 seconds and Tracy Debugger count more than 14000 pages loaded.
      When I look in the pages loaded list, I find a very large amount of lines that look like this:
      1247 /sc_admin/repeaters/for-field-182/for-page-1246/ Page 1248 /sc_admin/repeaters/for-field-158/for-page-1246/ Page 1249 /sc_admin/repeaters/for-field-159/for-page-1246/ Page 1250 /sc_admin/repeaters/for-field-169/for-page-1246/ Page 1251 /sc_admin/repeaters/for-field-170/for-page-1246/ Page 1252 /sc_admin/repeaters/for-field-180/for-page-1246/ Page 1254 /sc_admin/repeaters/for-field-137/for-page-1253/ Page 1256 /sc_admin/repeaters/for-field-182/for-page-1255/ Page 1258 /sc_admin/repeaters/for-field-170/for-page-1195/ Page 1261 /sc_admin/repeaters/for-field-182/for-page-1132/ Page 1262 /sc_admin/repeaters/for-field-159/for-page-1132/ Page 1263 /sc_admin/repeaters/for-field-169/for-page-1132/ Page 1264 /sc_admin/repeaters/for-field-170/for-page-1132/ Page 1265 /sc_admin/repeaters/for-field-180/for-page-1132/ Page Or other like :
      10222 /sc_admin/repeaters/for-field-138/for-page-5710/1623420295-8678-1/ RepeaterMatrixPage 10232 /sc_admin/repeaters/for-field-138/for-page-5710/1623420316-7346-1/ RepeaterMatrixPage 10242 /sc_admin/repeaters/for-field-138/for-page-5708/1623482402-7605-1/ RepeaterMatrixPage 10256 /sc_admin/repeaters/for-field-138/for-page-10254/1624257169-0968-1/ RepeaterMatrixPage 10266 /sc_admin/repeaters/for-field-138/for-page-10254/1624257191-2937-1/ RepeaterMatrixPage 10278 /sc_admin/repeaters/for-field-138/for-page-10254/1624257284-3093-1/ RepeaterMatrixPage 10289 /sc_admin/repeaters/for-field-138/for-page-10254/1624258816-4716-1/ RepeaterMatrixPage 10302 /sc_admin/repeaters/for-field-138/for-page-10254/1624259001-0062-1/ RepeaterMatrixPage 10312 /sc_admin/repeaters/for-field-138/for-page-10254/1624259056-5808-1/ RepeaterMatrixPage 10326 /sc_admin/repeaters/for-field-138/for-page-10254/1624259204-4337-1/ RepeaterMatrixPage 10336 /sc_admin/repeaters/for-field-138/for-page-10254/1624259240-545-1/ RepeaterMatrixPage 10347 /sc_admin/repeaters/for-field-138/for-page-10254/1624259280-7777-1/ RepeaterMatrixPage 10357 /sc_admin/repeaters/for-field-138/for-page-10254/1624259299-317-1/ RepeaterMatrixPage 10369 /sc_admin/repeaters/for-field-138/for-page-6006/1624259684-8705-1/ RepeaterMatrixPage 10381 /sc_admin/repeaters/for-field-138/for-page-10379/1624259765-4187-1/ RepeaterMatrixPage More than 10000...
      This template doesn't contain repeaterMatrix.
      How can I understand what's happened ?
      Thanks for your help
    • By Guy Incognito
      We have a client's Processwire site where the Pageimage::size() method has stopped working. It's creating small white PNGs in the assets folder instead of the resized image as usual.
      Their hosting was recently upgraded and switched to PHP 7.4 and I'm wondering if a they've removed a PHP package or changed a server config to cause this.
      Does anyone know if the image resizing functionality requires specific PHP modules I need to check for?
      I've checked the folder permissions on the server - this all looks fine.
      TIA,
      J
    • By Cesco
      Hi is possible to hide FieldsetTab if page has field set to certain value?
      It's possible for other field type by Input->Visibility->if... but not for FieldsetTab. 
      Thanks
      Francesco
×
×
  • Create New...