Reply New Topic
2008/5/1 2:50:27
#1
Offline
Home away from home

[HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

How to convert old and unmaintained translations from ISO to Unicode UTF-8*

* UTF-8 without Byte of Mark

1. U need editor like NotePad Plus, u can get it from http://notepad-plus.sourceforge.net/uk/news.php?lang=uk
2. Open the selected file from modules\module-name\language\selected-language\thefile.php

Now press CTRL+A for Select All, then CTRL+C to copy the selection into your clipboard, then pick the drop-down menu format, and select
Encode in UTF-8 without BOM and press CTRL+V to paste it from your clipboard, then save it and re-upload it to your XOOPS 2.2/Impress 1.1 language folder.

BUGS:
If u click by mistake Encode in UTF-8 u will get blank page. OOPS core can't recognize UTF-8 encoded files. You can solve the blank page problem, by repeating the above procedure.

If u do this for XOOPS 2.0.18.1, u will get everything else as symbols on your screen, but not your language :)

If u wanna try this on XCL, feel free to do it and report any results :)

The following procedure works on any XOOPS up to phppp 2.0.17.1, and there is no need to apply "USE MULTIBYTE 1" in your language\global.php.

For OOPSes up to 2.0.17 (from 2.0.7.3), u simply have to set in global.php UTF-8 instead of ISO, and to add to your .htaccess the following line.


PHP_FLAG default_charset UTF-8


2008/5/1 3:14:48
#2
Offline
Just can not stay away

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

I hate GUI which slow my works down.

I usually use nkf to convert things to UTF-8 (without BOM) as following:

$ cd /path/to/language/directory $ nkf -w --overwrite *.php *.tpl *.html


iconv also can do the same task.
Quote:


$ iconv --help
Usage: iconv [OPTION...] [FILE...]
Convert encoding of given files from one encoding to another.

Input/Output format specification:
-f, --from-code=NAME encoding of original text
-t, --to-code=NAME encoding for output

Information:
-l, --list list all known coded character sets

Output control:
-c omit invalid characters from output
-o, --output=FILE output file
-s, --silent suppress warnings
--verbose print progress information

-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.



2008/5/1 3:20:34
#3
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Nice addition, but I prefer Vista over Beryl and Gentoo, probably most of the users/devs and translators are on Windows eXtra Problems :)


2008/5/1 3:38:37
#4
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Quote:


ep98 wrote:
Nice addition, but I prefer Vista over Beryl and Gentoo, probably most of the users/devs and translators are on Windows eXtra Problems :)



Yes, this is my case.

_________________
Giba

2008/5/1 4:14:19
#5
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Quote:


avtx30 wrote:
I hate GUI which slow my works down.

I usually use nkf to convert things to UTF-8 (without BOM) as following:


$ cd /path/to/language/directory
$ nkf -w --overwrite *.php *.tpl *.html


iconv also can do the same task.
Quote:


$ iconv --help
Usage: iconv [OPTION...] [FILE...]
Convert encoding of given files from one encoding to another.

Input/Output format specification:
-f, --from-code=NAME encoding of original text
-t, --to-code=NAME encoding for output

Information:
-l, --list list all known coded character sets

Output control:
-c omit invalid characters from output
-o, --output=FILE output file
-s, --silent suppress warnings
--verbose print progress information

-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

For bug reporting instructions, please see:
.



Yes, exactly iconv can do this, this is the method we've used to change database to utf-8 ...


2008/5/1 4:23:39
#6
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

There is a faster way to save the files of translation into UTF-8?

ps: I am using Windows XP

If not, I'm saving file by file, has no problem.

_________________
Giba

2008/5/1 4:41:17
#7
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Try with this tool
http://software.techrepublic.com.com/abstract.aspx?docid=232511

Not verified for UTF-8 without Byte of Mark, the described way is more secure at least for me, slow but where should goes the fun then if everything is converted with one shot


2008/5/1 4:46:01
#8
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Thank you for the useful help on this topic ep98!


2008/5/1 4:46:02
#9
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Exelent Sugestion

Quote:


Overview: This is a conversion tool to convert from one character set to another within text documents. It supports 53 character sets, i.e. nearly all ISO 8859 character sets, all DOS character sets, most important Apple character sets and most of Windows character sets (non Asian). It is also able to convert from or to UTF-8, UTF-16 and UTF-16BE (Big Endian). It automatically detects UTF-8, UTF-16 and UTF-16 BE documents. Field of Application: 1. Convert documents based upon Windows ANSI character set (CP 1252) (Notepad) into corresponding ISO 8859-1 or ISO 8859-15 (if possible) 2. Converts Web pages based upon certain ISO 8859 character sets into valid UTF-8 documents which is recommended for new Web pages. Preferred operation mode is console mode now. Version 1.3.9.5 is a bug fixing release.



I try now Thanks again.

_________________
Giba

2008/5/1 6:11:34
#10
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Yes, work fine

Revision 1917

Automatic, using software charsc indication by ep98, thanks.

Moment Zen (Revision)

Ual, Revision 2000 is next.

_________________
Giba

2008/5/2 3:34:18
#11
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Quote:

Ual, Revision 2000 is next.


yup ^^ still 29 commits left!
Mr theme, I think you need to make a new logo


2008/5/2 3:42:57
#12
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

Off-topic continue: sorry...

Quote:


stranger wrote:
Quote:

Ual, Revision 2000 is next.


yup ^^ still 29 commits left!
Mr theme, I think you need to make a new logo


Total Agree Mr Theme logo, new logo, new logo

_________________
Giba

2008/5/2 4:12:23
#13
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

:)
I'm glad this small howto helps someone, going off for a few days, have to finish Sigsiu.NET translation, J1.5.3 synchronization, and few other plugins

.... Impress was a bit late, back in monday with new 500 gigs hard drive :)


2008/5/3 3:55:58
#14
Offline
Home away from home

Re: [HOWTO] Convert old ISO to UTF-8 for ICMS 1.1

off topic again, sorry

Hi, revision stranger 1999


I think the honour of the 2,000 should be of it stranger, great work, great participation.

Oops confirmated


_________________
Giba

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.