• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Convert files to utf8

Contributor ,
Feb 08, 2017 Feb 08, 2017

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:

  1. 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.
  2. 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

Views

7.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 08, 2017 Feb 08, 2017

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 -

http://www.fileformat.info/info/charset/UTF-8/list.htm

Votes

Translate

Translate
Guru ,
Feb 08, 2017 Feb 08, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 08, 2017 Feb 08, 2017

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.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 08, 2017 Feb 08, 2017

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 -

http://www.fileformat.info/info/charset/UTF-8/list.htm

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 08, 2017 Feb 08, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 18, 2017 Oct 18, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

LATEST

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 "&agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "&Agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "&egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "&Egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "&eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "&Eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "&igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "&Igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "&iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "&Iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "&ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "&Ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "&ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "&Ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "&auml;"

"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 "&ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "&Ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "&uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "&Uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\de" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "&szlig;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "à" --replace "&agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "&Agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "&egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "&Egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "&eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "&Eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "&igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "&Igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "&iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "&Iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "&ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "&Ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "&ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "&Ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "&auml;"

"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 "&ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "&Ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "&uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "&Uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\it" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "&szlig;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "à" --replace "&agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "À" --replace "&Agrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "è" --replace "&egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "È" --replace "&Egrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "é" --replace "&eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "É" --replace "&Eacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ì" --replace "&igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ì" --replace "&Igrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "í" --replace "&iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Í" --replace "&Iacute;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ò" --replace "&ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ò" --replace "&Ograve;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ù" --replace "&ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ù" --replace "&Ugrave;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ä" --replace "&auml;"

"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 "&ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ö" --replace "&Ouml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ü" --replace "&uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "Ü" --replace "&Uuml;"

"C:\MeineProgramme\Find And Replace Tool.exe" --cl --dir "%cd%\.\en" --fileMask "*.php" --excludeFileMask "*.dll, *.exe" --caseSensitive --useEscapeChars --find "ß" --replace "&szlig;"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines