Difference between #14 and #15 of
Remove Byte Order Mark (BOM) from files recursively

Revision #15 has been created by samdark on Jan 20, 2019, 9:06:19 PM with the memo:

Removed intro
« previous (#14)

Changes

Title unchanged

Remove Byte Order Mark (BOM) from files recursively

Category unchanged

How-tos

Yii version changed

all

Tags changed

recursive,without, BOM, utf-8, folder, files, recursive

Content changed

Ok, this wiki is not only for yii projects.
 
 
The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.

So, I needed to remove BOM from hundreds view files of Yii from a lot of Yii projects manually.
[...]
2) Run this command

```php
grep -rl $'\xEF\xBB\xBF' /home/rootfolder/Yii_project > file_with_boms.txt ``` 3) Now, Run this one
```php

while read l; do sed -i '1 s/^\xef\xbb\xbf//' $l; done < file_with_boms.txt
```

Thats it! The BOM will be removed from all files that contained it. Now you can upload your project on your server.
[...]
2 1
7 followers
Viewed: 34 209 times
Version: all
Category: How-tos
Last updated by: samdark
Created on: Oct 2, 2013
Last updated: 5 years ago
Update Article

Revisions

View all history