How to convert a language file to UTF-8 without BOM - Newies read first!!!

How to support more than one language on your site.

Moderator: General Support Moderators

Forum rules
Locked
ivo.apostolov
I've been banned!
Posts: 1868
Joined: Thu Aug 25, 2005 2:33 pm

How to convert a language file to UTF-8 without BOM - Newies read first!!!

Post by ivo.apostolov » Sun Sep 16, 2007 11:13 pm

Step by Step, how to convert a language file in UTF-8 without BOM!

The following instruction applies to Windows based computers.

The easy way:

1. Download the language file(s) you want to convert in UTF-8. Please make sure that it is not already in UTF.
2. Place the file(s) you want to convert in a separate directory.
3. Download this tool, unzip and run the executable file.
4. Choose the path to the directory.
5. Add all file extensions (i.e. .php)
6. Run the tool.
7. Open all files with editor that supports UTF-8 without BOM (like Notepad++) and change the line where the encoding is set to “UTF-8”. Basically this is the tag:
DEFINE('_ISO','charset=SOMETHING');
so change it to:
DEFINE('_ISO','charset=UTF-8');
8. Save the file.
That’s it.

The hard way:

1. Download the language file(s) you want to convert in UTF-8. Please make sure that it is not already in UTF.
2. Open the file with editor that supports UTF-8 without BOM (like Notepad++). Please make sure that your operating system supports the original ASCII encoding. That means, when you open the file, the data inside should be 100% readable. If not, please proceed to the “easy way”.
3. Select all the content of the file and cut it.
4. Go to “Format” (In Notepad++) and place a tick on UTF-8 without BOM.
5. Paste the cut content.
6. Save the file. It is expected everything to be readable.
7. Open the file with editor that supports UTF-8 without BOM (like Notepad++) and change the line where the encoding is set to “UTF-8”. Basically this is the tag:
DEFINE('_ISO','charset=SOMETHING');
so change it to:
DEFINE('_ISO','charset=UTF-8');
8. Save the file.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to convert a language file to UTF-8 without BOM - Newies read first!!!

Post by infograf768 » Mon Sep 17, 2007 6:08 am

On Macintosh computers, use Textwrangler, a free scaled down version of BBEdit.
http://www.barebones.com/products/textw ... ndex.shtml
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: How to convert a language file to UTF-8 without BOM - Newies read first!!!

Post by infograf768 » Thu Oct 11, 2007 5:36 am

Found an easier one for Windows.
http://www.babelstone.co.uk/Software/BabelPad.html

Runs directly and has option to save as utf8 No Bom  ;)
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Joom!Fish and Multilingual Sites”