Copy link to clipboard
Copied
I use Dreamweaver CC V. 2015
I am trying to find an automatic or semi-automatic method to convert html/php etc. files in Dreamweaver to UTF8. Ideal would be a method with which I could convert all the files of a site automatically.
My files contain:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
and are encoded with Europe occidental
I would change in
"<meta charset =" utf-8 ">" with encoding utf-8
I have already tried:
- Search replace all files in a site so that all files get this Meta tag: <meta charset =" utf-8 ">
Does not work, since all files then contain this Meta tag, but the special characters ä, ü, ö, ß are coded incorrectly. - I tried to save the procedure “change page properties” (CRTL + J> Encoding > utf-8) thought the history panel as a Dreamweaver command (Save as command). I would repeat quickly this command on all other files. Does not work, since I cannot save a pages property as a command. This is not possible in Dreamweaver.
My manual solution is:
Change manually the Encoding with CRTL + J> Encoding > utf-8.
This is unfortunately a very large effort for x Dreamweaver sites with y of files (x > 400, y > 50).
Does someone have an idea how I get faster?
Thanks
1 Correct answer
utf-8 does contain all character encoding for umlaut and sharf-S, but if you have used the character encoding for your previous charset=windows-1252, then this will cause problems, as they will be incorrect and must be replaced.
For the characters supported by utf-8, see -
Copy link to clipboard
Copied
If I had this problem I think I would write a PHP script to iterate through the files and change the encoding using the following function:
http://php.net/manual/en/function.mb-convert-encoding.php
Normally when there is a lot of content it is most efficient to store it in a database and populate HTML page empty shells with the content based on parameters in the $_POST or $_GET array. Just something to think about.
Copy link to clipboard
Copied
Yes, a PHP script would be a possibility. But is not it possible with Dreamweaver? (In principle, Dreamweaver can do everything but I can not automate it.)
Copy link to clipboard
Copied
utf-8 does contain all character encoding for umlaut and sharf-S, but if you have used the character encoding for your previous charset=windows-1252, then this will cause problems, as they will be incorrect and must be replaced.
For the characters supported by utf-8, see -
Copy link to clipboard
Copied
@pziecina:
Yes exactly that is the problem with search replace. And after search replaece meta tag to utf-8 all special charaters are the same, so I can not correct the the wrong characters with search replace.
Copy link to clipboard
Copied
My DW (2017 update) suddenly stopped encoding several languages and it too me over 3 hours to find a work around. This is a pain in the ass but it worked when ALL ELSE failed.
STAGE 1
Open any page in DW (CC 2017)
TOP MENU > Select FILE > PAGE PROPERTIES > TITLE/ENCODING
change ENCODING to UTF-8
Click APPLY > OK
STAGE 2
Close DW.
OPEN the page with the encoding in a PHP editor (notepad type program)
SAVE AS UTF-8
(ensure that the languages are correct)
reopen in DW
You must open EVERY page with code and SAVE AS utf-8 in the php text editor (Like I said, pain in the donkey)
but hey, it works
Hope this helps some people save a few hours and lots of hair
Copy link to clipboard
Copied
Hello, this is not a fast workflow. For me I found an another solution. I use this tool: fnr.exe - Find And Replace Tool - Home and a Windows batch file to convert all German and Italian special characters in the html entities. Then I can simple search and replace the meta tag charset over all files. This is faster 🙂
Here the content of my batch file as example (this convertes the special characters in all php files in the subfolders folder /de, /it and /en )
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "à" --replace "à"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "À"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "è"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "È"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "é"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "É"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "Ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "Í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "Ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "Ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "ä"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ä" --replace "&Äuml;"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ö" --replace "ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "Ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "Ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "ß"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "à" --replace "à"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "À"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "è"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "È"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "é"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "É"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "Ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "Í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "Ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "Ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "ä"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ä" --replace "&Äuml;"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ö" --replace "ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "Ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "Ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "ß"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "à" --replace "à"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "À"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "è"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "È"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "é"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "É"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "Ì"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "Í"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "Ò"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "Ù"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "ä"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ä" --replace "&Äuml;"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ö" --replace "ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "Ö"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "Ü"
"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "ß"

