pwired Posted April 9, 2015 Posted April 9, 2015 Hi I finally solved pesky umlaut problems that I had in a non processwire webshop. Since the solution I found is also inside the domain of processwire (utf8 - bom - charset - etc.) I decided to post my solution and ask if somebody has a better or faster way of tracing this problem to the files causing this problem. Maybe an utf8 file checker or something ? When I found the file of origin, index.php, that executed the output resulting in umlauts not correctly shown in the browser like this: Vielen Dank für Ihre Bestellung, I ftp downloaded this file index.php, opened it locally with notepad, and then saved it again with notepad but this time as: a) File name: index.php b) Save as type: Text Documents (*.txt) c) Encoding: utf8 After saving I noticed that it became 3 Bytes bigger, before 4017 Bytes, after 4020 Bytes. I then ftp re-uploaded this index.php, did a test order in the webshop and everything was ok, that is the umlauts suddenly showed up correctly in the browser like this: Vielen Dank für Ihre Bestellung. Since it took me a long time to pinpoint the right file, in this case an index.php file deep inside a webshop, does anyone know a better or faster way to find files causing such problems ?
horst Posted April 9, 2015 Posted April 9, 2015 I quick way could be to first google: https://www.google.de/search?q=detect+charset+of+file&ie=utf-8&oe=utf-8&gws_rd=cr&ei=1zMmVbL4GMziauzZgegC#q=detect+charset+of+file+PHP And then put up one of the links. WIth your question you wil find some pointing to the PHP-Manual (mb-detect-encoding) and to StackOverflow: http://stackoverflow.com/questions/505562/detect-file-encoding-in-php
pwired Posted April 9, 2015 Author Posted April 9, 2015 Thanks Horst for that google direction lots of solutions popping up from there.
Recommended Posts